フィルターのクリア

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

7 ビュー (過去 30 日間)
david leonard
david leonard 2021 年 2 月 10 日
回答済み: randerss simil 2021 年 2 月 10 日
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 Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by