plotting line parallel to the x-axis instead of the y-axis

4 次查看(过去 30 天)
Hi Folks,
i have the following code.
int = A{:,4};
wl = A{:,1};
plot(wl-0.01,0,'b',wl,int,'b',wl+0.01,0,'b')
it reads in numbers from an imported excel sheet and plots it.
the numbers are read as double with 3 decimal places. i am adding 0 either side of the values to be adjusted at a later date.
the plotted line starts from the bottom of the y axis=0 and plots going up i.e. it plots going up. i want it to start at the x=0 point and plot the line going away in the x+ direction instead of the y+ direction. Any ideas how to do this?
Thanks,
Dave

回答(1 个)

randerss simil
randerss simil 2021-2-10
%if
plot([wl-0.01,0],intt,'b',wl,intt,'b',[wl+0.01,0],intt,'b')
Use [] for adding elements and int is standard function in matlab. So i changed it to something like intt

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by