Azzera filtri
Azzera filtri

Cannot plot cell 1x1 from a matrix NxN againt another 1xN array.

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

Lem
Lem il 12 Ott 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);

Community Treasure Hunt

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

Start Hunting!

Translated by