I want my function to ignore some inputs
8 views (last 30 days)
Hello, I made a function called plotgeral that makes plots what I want with the format that I desire.
the 1st line of the function where i declare my outputs and inputs is:
out = plotgeral(Y,Y1,Y2,Y3,Y4,Y5,Xaxis title,Yaxis title,title,legend,legend1,legend2,legend3,legend4,legend5)
Sometimes I want to draw the plot with 6 inputs of data (Y -> Y5), but sometimes I just want the Y and Y1, for example. What should I do in this case? The name of Axis, title and legend are defined by me in the script with ' '.
out = plotgeral(Y,Y1,,,,,Xaxis title,Yaxis title,title,legend,legend,,,,)
but I get an error on the part of the legend, because  it an invalid argument for the legend.
Thanks for your time.