file type in matlab workspace
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Safi ullah
le 16 Fév 2017
Commenté : Walter Roberson
le 17 Fév 2017
I studied a program related to my work in which I have a file named vhf_power_0510, when I loaded this file, then in matlab workspace it appears as: note here that I write square brackets and equal sign only to make clear what is written in workspace :
[Name=pwr value=1800×10×267 double Min=<Too many elements> Max=<Too many elements>]
In program after that when they write in command window,
lgtime=length(pwr(:,1,1))
Then in workspace it appears as: *note that here I again write square brackets and equal sign only to make clear what is written in workspace
[Name=lgtime value=1800 Min=1800 Max=1800]
My problem is that I don't understand pwr is which type of matrix or how this type of matrix is created and how I can open this file from workspace? Because in matlab workspace matrix has only m×n while there are 3 numbers 1800×10×267 double. Also when I double click to open pwr from workspace it does not open rather a sentence comes 'Cannot display summaries of variables with more than 524288 elements'.
1 commentaire
Walter Roberson
le 17 Fév 2017
Duplicates https://www.mathworks.com/matlabcentral/answers/325324-file-type-in-matlab-workspace but this one has an answer
Réponse acceptée
Walter Roberson
le 16 Fév 2017
length(TheMatrix) of a 3D matrix is max(size(TheMatrix)) -- that is, the length of the longest dimension. Your array is 1800 x 10 x 267 and the largest of those is 1800 so the length shows up as 1800. But the original matrix is 3 dimensional.
You can extract part of it and view that. For example,
P1 = pwr(:,:,1);
and then you can view P1.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Workspace Variables and MAT-Files 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!