Effacer les filtres
Effacer les filtres

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

7 vues (au cours des 30 derniers jours)
david leonard
david leonard le 10 Fév 2021
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

Réponses (1)

randerss simil
randerss simil le 10 Fév 2021
%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

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by