how to plot the graph of r vs t

r=[10 20 30]
t=[40 50 60];
figure;
plot(r,t)
xlabel('r')
ylabel('t')
for the above code how to plot the graph of
  • r=10 vs t=[40 50 60]
  • r=20 vs t=[40 50 60]
  • r=30 vs t=[40 50 60]

Respuestas (1)

Walter Roberson
Walter Roberson el 5 de Dic. de 2017
r = [10 20 30]
t = [40 50 60];
[R, T] = meshgrid(r, t);
plot(R, T)
You might possibly need ndgrid() instead of meshgrid()

3 comentarios

Prabha Kumaresan
Prabha Kumaresan el 5 de Dic. de 2017
thanks for your response.but the plot which i was expecting is x axis should be 1:10 and yaxis should be 1:40,then x axis 1:20 y axis 1:50,xaxis 1:30 y axis 1:60 separately
Walter Roberson
Walter Roberson el 5 de Dic. de 2017
Okay so if you plot with those limits extracted from r and t, then what should be the line plotted in each case?
Prabha Kumaresan
Prabha Kumaresan el 5 de Dic. de 2017
the line should be the throughput expression throughput =((Bmax.*log(1+((p_fix).*C))./noise)); u= 1:length(r) v =1:length(t) C is (u,v) and Bmax,p_fix and noise values are getting fixed.

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 5 de Dic. de 2017

Comentada:

el 5 de Dic. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by