Scatterplot arrays with different number of elements and tracing the trendline
Mostrar comentarios más antiguos
So... I have 3 arrays, one is called "M_IRI" (1 row and 36 columns) and the other is called "EVAN_DSUV_FSDN_100" (3 rows and 36 columns) and "RESTO_100" (3 rows and 36 columns) respectively . My problem is happening when I try to make a scatterplot... It just doesn't work.
I need to make this scatterplot to get the trend line between these values, one of my colleagues said to do it separately and then just plot the average of these 2 3x36 matrices, but statistically, this is wrong, so I need to somehow get these 2 trend lines, one between M_IRI and EVAN_DSUV_FSDN_100 and between M_IRI and RESTO_100.
Is there any way to do this?
2 comentarios
It isn't at all clear to me what you are trying to do from your description. Exactly which variable do you want plotted in the y-axis (vertical) of your scatter plot(s) and which variables do you want as the x-axis (horizontal).
For example if you wanted to plot the second row of EVAN_DSUV_FSDN_100 (y-axis) vs M_IRI (x-axis), you could use
plot(M_IRI,EVAN_DSUV_FSDN_100(2,:),'o')
xlabel('M_IRI')
ylabel('EVAN_DSUV_FSDN_100 ')
You could also use
scatter(M_IRI,EVAN_DSUV_FSDN_100(2,:))
xlabel('M_IRI')
ylabel('EVAN_DSUV_FSDN_100 ')
Jon
el 14 de Sept. de 2023
Reading your question more carefully, and in particular your last sentence I think I understand what you are trying to do. I would recommend using @Star Strider's answer
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

