Cannot plot cell 1x1 from a matrix NxN againt another 1xN array.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
So, i have multiple matrices (more than three) in this arrangement:
val(:,:,1) =
18 18 18 18 18
18 18 18 18 18
18 18 18 18 18
18 18 18 18 18
18 18 18 18 18
val(:,:,2) =
18 18 18 18 120
18 18 18 18 120
18 18 18 18 120
18 18 18 18 120
120 120 120 120 120
val(:,:,3) =
18.0000 18.0000 18.0000 18.4570 120.0000
18.0000 18.0000 18.0000 18.4570 120.0000
18.0000 18.0000 18.0000 18.4570 120.0000
18.5331 18.5331 18.5331 18.9901 120.0000
120.0000 120.0000 120.0000 120.0000 120.0000
Wich first cell, val(1,1,:), have to be plotted with a time array, wich it's arrangement goes like this:
0 7 14
So in this case, with all this data, im only plotting:
0 18
7 18
14 18
To get, in this case, a line at 18 (degrees in my case) through time from 0 to 14 seconds.
I cannot find how to extract only the first cell of my matrices, ergo, cannot plot them with my time array.
Halp! :C
0 commentaires
Réponses (1)
Lem
le 12 Oct 2011
I don't know if this is an efficient method, but I was able to generate the plot you want by adding the following code:
temp = val(1, 1, :);
y = temp(:, :);
plot(t, y);
3 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!