#19502: Octave script that doesn't run
--------------------------+-----------------------------
Reporter: kcrisman | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.10
Component: interfaces | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
--------------------------+-----------------------------
See [http://ask.sagemath.org/question/30334/runs-in-octave-tested-but-not-
sagemathcloud-errors/ 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
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19502>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.