Why I get error during analysis ?
2 次查看(过去 30 天)
显示 更早的评论
Hai,
I tried to run this matlab program (AnalyseDataLaas), But it is showing a error like this in the command window
>> AnalyseDataLaas
Output argument "turns" (and maybe others) not assigned during call to
"D:\Vijay\RodTracker-v1.0.2\PlotTrajectories.m>PlotTrajectories".
Error in AnalyseDataLaas (line 144)
[saveStruct, stretches, rod, turns, drift, velocity] =
PlotTrajectories(saveStruct,closeAllWindows,errorbars,0);
So I checked the line 144 and it is written like this
[saveStruct, stretches, rod, turns, drift, velocity] = PlotTrajectories(saveStruct,closeAllWindows,errorbars,0);
please help anybody to solve it
0 个评论
回答(2 个)
Ced
2016-3-8
It means that you defined "turns" as being an output argument in "PlotTrajectories", but you never assigned any value to it (it does not exist). Check your "PlotTrajectories" function and make sure "turns" exists when you exit the function.
0 个评论
Matthew Eicholtz
2016-3-8
This is difficult to answer without knowing what the functions AnalyseDataLaas and PlotTrajectories look like.
However, the error that you are receiving simply means that some of the expected outputs from PlotTrajectories (e.g. 'turns'), are not being assigned. Look at the function PlotTrajectories and make sure that somewhere in the code it is assigning something to 'turns' (and all the other outputs as well).
Here is another (albeit trivial) example where you would encounter this error:
function y = fcn(x)
z = x^2; %I meant to set y to x^2 but I accidentally typed z instead
end
If you type the follow in the Command Window:
y = fcn(4);
You will receive the following error:
Output argument "y" (and maybe others) not assigned during call to "fcn".
Because nowhere in the code do I set y equal to something. Hope this helps.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!