help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handle fsolve error


From: armando
Subject: Handle fsolve error
Date: Fri, 6 Dec 2013 19:15:11 -0800 (PST)

whats wrong with script ?

i aprecate help.

thanks,
armando


>>>error: error creating function handle "@f"
error: called from:
error:  
C:\Programas\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\optimization\fsolve.
m at line 138, column 9
error:   erro.m at line 16, column 9





- - - - - - - - - -

clear all

Xa=input('----------cood. x of  A point: ')
AB=input('----------AB distance: ')
        
Za=Xa;                  % distancia entre o ponto A e o ponto B
A=[Xa 0 Za]             % coordenadas do ponto A(Xa,Ya,Za)


function y[x]=f (Xa,Za,AB)
y(1)= (Zb-Za)/(Xb-Xa)*Xa+0-Za;          % equacao da reta 
y(2)=(Xb-Xa)^2+(Zb-Za)^2-AB^2;  % equacao do circulo de raio AB
y(3)=(Zb-Za)/(Xb-Xa)-tan(pi/4);         % inclinacao da reta 'm'
endfunction

[x,info]=fsolve("f",[1;1])

B=[x(1) 0 x(2)]



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Handle-fsolve-error-tp4659907.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]