What should I write in the command window for this input of the function?

Hi All,
Basically, I was given this function by my teacher:
function[stability,lds]=lds_cal(state,hs,fs,time,n_neighbours, plot)
and there is more explainantion of the funtion after this line. I've already insert all the value for the input of this function in the command window such as state, hs, time, fs,n_neighbours. But the problem is I dont know what to write for the "plot" input in the command window.

8 commentaires

It may be a plot flag i.e. if true means they want plot (figure) of some input param like time against n_neighbours etc
Can you provide the body of the function?
I dont know what to write in the command window for the input "plotje"..I also dont know how to plot the code inside my function..
Looks like Muhammad was right! Specify plotje as 1 or true if you want a plot to show, as 0 or false if not.
"I also dont know how to plot the code inside my function.."
I apologize, I'm not quite sure what you mean.
wahhhhh yaa I got it!! thanks a lot.
So does it mean that after I write plotje=1, the graph will show up?
It means when you execute
lds_cal(arg1,arg2,arg3,arg4,arg5,arg6)
it will display a plot when arg6 evaluates to true.
okay got it!!! thanks a lot yaaa!!
i don't know how to accept your answer since there is no button "accept answer" here..

Connectez-vous pour commenter.

 Réponse acceptée

function[stability,lds]=lds_cal(state,hs,fs,time,n_neighbours, plot)
if(plot)
figure,plot(time,n_neighbours) % or any two args you want to plot
end
end

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Produits

Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by