Error: Too many outputs to function
Show older comments
I'm a student in an entree level programming class.
I'm using Freemat just in case that becomes a problem, but I have a hopefully simple question In my main script,
for i=2:5
T(i)=nodeTemperature(i,T,h);
end
then in the nodeTemperature script,
function nodeTemperature(i,T,h)
evalin('base','T(i-1) + T(i+1) + (h^2)*B*Ts / ( (h^2)*B+2)');
is giving me "Too many outputs" I've defined h and B already in my script and when I type out for instance "nodeTemperature(2,T,h)" in the command window it returns the value I am expecting. But when I try to set it equal to T(i)it gives me the error. I'm required to have the "T(i)" be defined by a function using evalin inside the function. I've gotten it to work when I eliminated the function but I won't get credit for the assignment.
I'm really really new to this and I could use the help, thanks
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Parallel Server in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!