Problem in using nlinfit?

2 visualizzazioni (ultimi 30 giorni)
Sameer il 22 Lug 2014
Commentato: Star Strider il 23 Lug 2014
Hello all
I want to use a nlinfit, previously I used for two inputs and it was working fine but not I have 3 inputs and its giving error:
??? Error using ==> statset at 262
Expected argument 2 to be a parameter name string or an options structure
created with STATSET.
Error in ==> nlinfit at 103
options = statset(statset('nlinfit'), options);
Error in ==> Nu_variables at 9
Error in ==> tem_dep_cal at 42
where my fitfun is:
function [ Nu ] = fitfun_Nu(param,Re,Pr)
can anyone guide me to rectify the error?
Thanking you!!!

Risposta accettata

Star Strider
Star Strider il 22 Lug 2014
You can pass two independent variables to your function but you have to combine them into one array. Assuming Re and Pr are both column vectors, the array for them becomes:
RePr = [Re Pr];
your function becomes:
function [ Nu ] = fitfun_Nu(param,RePr)
and the call to nlinfit becomes:
That should work.

Più risposte (0)


Scopri di più su Read, Write, and Modify Image in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by