MATLAB: Load x,y

communications blocksetCommunications ToolboxDSP System ToolboxfftifftloadMATLAB Builder for COMplotplottingsavesignal processingsubplot

if x = [1 2 3 …… 10]
y1=[0.5 1.7 1.75 1.9 2 2.1 2.4 2.6 2.7 2.9 ]
y2=[0.7 1.8 1.9 2 2.3 2.5 2.7 2.8 2.9 3]
how can I make save (x,y) and (x,y1) then do load it
then plot it

Best Answer

Try this:
x = 1:10;
y1=[0.5 1.7 1.75 1.9 2 2.1 2.4 2.6 2.7 2.9 ]
y2=[0.7 1.8 1.9 2 2.3 2.5 2.7 2.8 2.9 3]
save('XYvectors.mat','x','y1','y2')
D = load ('XYvectors.mat');
x = D.x;
Y1 = D.y1;
y2 = D.y2;
Use whatever file name you want.
See the documentation for the plot function.