Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octave script that doesn't run #19502

Open
kcrisman opened this issue Oct 29, 2015 · 1 comment
Open

Octave script that doesn't run #19502

kcrisman opened this issue Oct 29, 2015 · 1 comment

Comments

@kcrisman
Copy link
Member

See this ask.sagemath question. Apparently the Octave code below doesn't run with octave.eval(), or at least hangs or something.

# a)

function y=f(x)  
    y=3/(2+x)
endfunction

function a=p(x)  
    y1=x^2
    y2=x
    y3=1
    a=[y1,y2,y3]
endfunction

# b)

# Stützstellen vector x

x=[-1 0 1]
f(x(1))
f(x(2))
f(x(3))

# Anzahl der Stützstellen bestimmer

d=length(x)
A=zeros(d,d)

for i=1:3
    A(i,:)=p(x(i))
endfor

b=zeros(3,1)

for i=1:3
    b(i)=f(x(i))
endfor

b
[L,U,P] = lu(A)
invL=inv(L)
y=invL*P*b
invU=inv(U)
z=invU*y
A*z
b

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/19502

@kcrisman kcrisman added this to the sage-6.10 milestone Oct 29, 2015
@kcrisman
Copy link
Member Author

comment:1

See also #2696 for a possibly related bug (or possibly not).

@mkoeppe mkoeppe removed this from the sage-6.10 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants