|
From: | Doug Stewart |
Subject: | Re: help function |
Date: | Mon, 9 Dec 2013 18:58:55 -0500 |
Hi,
Please help me in this little part of code:
....script.................................................clear all
Xa=input('----------cood. x do ponto A: ')
AB=input('----------AB diametro maior da ELIPSE: ')
Za=Xa;
A=[Xa 0 Za]
xx=[Xa Za AB]
function y(x)=XbZb(xx)
y(1)= (x(1)-xx(2))/(x(2)-xx(1))*xx(1)+0-x(2);
y(2)=(x(1)-xx(1))^2+(x(2)-xx(2))^2-xx(3)^2;
endfunction
[x,info]=fsolve("XbZb",[1;1])
B=[x(1) 0 x(2)]
.....end script........................................
Octave Terminal answer:
>>>parse error near line 11 of file G:\erro.m
syntax error
>>> function y(x)=XbZb(xx)
^
==========================
Then I change to:
function y=XbZb(xx)
Octave Terminal answer:
>>>error: `x' undefined near line 12 column 8
error: called from:
error: XbZb at line 12, column 5
error: C:\Programas\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\optimization\fsolve.
m at line 177, column 6
error: G:\erro.m at line 16, column 9
thanks
--
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |