10-06-2014 04:12 AM
Hello.
I have a problem with fsolve function. can u help me please?
I think that fsolve function should be work correctly in mathscript node, but I cant use it in my math script node code. this is my code that correctly work in MATLAB:
x0=[150;.00001;1.5];
x1=zeros(Npump,3);
%% make pump curve
for ii=1:Npump
kk=0;
QH=zeros(1,3);
HQ=zeros(1,3);
for jj=1:2:6
kk=kk+1;
QH(kk)=DisQH(ii,jj);
HQ(kk)=DisQH(ii,jj+1);
end
save Q QH
save H HQ
x1(ii,:)=fsolve(@pumpcurve,x0);
end
can u help TO find problem?
10-06-2014 04:23 AM
Code snippet of your runnable VI?
10-06-2014 04:39 AM
excuse me ToeCutter, I dont understand your mean. this is a part of my code that I have problem with. my code is perform except this part
10-06-2014 04:47 AM
10-06-2014 05:37 AM - edited 10-06-2014 05:40 AM
fsolve() uses Optimization Toolbox. LabVIEW's MathScript does not load toolboxes. You may think about finding the files required for running fsolve() and copying them into your working directory.
Check out some other threads: http://forums.ni.com/t5/LabVIEW/Calling-MATLAB-SOAP-From-MathScript/m-p/1237926/highlight/true#M5241...
10-06-2014 11:13 PM - edited 10-06-2014 11:16 PM
thanks a lot ghighuphu. I'll try your suggestion. is any function for nonlinear equation instead of Fsolve?
....
Hi GerdW, thank u too.
10-06-2014 11:34 PM
Have you tried searching in the functions palette for "nonlinear?" The search function is how I got around the various palettes until I learned where most of the stuff was. 🙂