Is that possible to assemble several options and pass to the plot function in matlab

前端 未结 4 578
死守一世寂寞
死守一世寂寞 2021-01-20 00:58

I am using matlab to plot several figures and hope these figure use the same plot options. To be more specific, it looks something like this.

N = 20;
Fs = 20         


        
4条回答
  •  猫巷女王i
    2021-01-20 01:24

    Solution with unique plotting function:

    subplot(312);
    myplot(t,y)
    

    Save myplot function as a separate m-file.

    function myplot(t,x)
        plot(t, x, 'bs-', 'MarkerFaceColor', 'b', 'LineWidth', 3);
    end
    

提交回复
热议问题