|
From: | armando herculano |
Subject: | help function |
Date: | Mon, 09 Dec 2013 22:10:13 +0000 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 |
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 --
armando herculano, eng.º Departamento
de Engenharia Eletrotécnica
|
[Prev in Thread] | Current Thread | [Next in Thread] |