I have some code
function runTubulin()
n = 10;
for j = 1:n
TubulinModel();
end
plot(TubulinModel(), n);
So my problem is that TubulinModel has a random number of outputs So I keep getting
??? Error using ==> TubulinModel Too
many output arguments.Error in ==> runTubulin at 11
plot(TubulinModel(), n);
Is there A way to plot the data when I do not know the size of the array?
The error you are getting (
Too many output arguments) implies that the functionTubulinModeldoesn’t actually return any outputs. The functionTubulinModelis expected to pass at least one output argument for the PLOT command to use, which it doesn’t appear to be doing. You can check this by trying the following:If this gives you an error, then it means you will have to modify
TubulinModelso that it returns the data you need, or places that data in a global variable that you can access outside of the function and use for the plot.