How can I use .mat file as new variable?
Afficher commentaires plus anciens
Hello!
I have saved some data from excell to matlab as a .mat file. Now I want to load and use them in matlab. For example, my data are saved in a file called 'DCS_data.mat' which includes 1996*2 data. I want to save the first column in a variable called T and the second column in a variable called heat. But I don't know how to do that. Could you pleae help me with this problem.
Regards,
Faezeh
Réponse acceptée
Plus de réponses (2)
KALYAN ACHARJYA
le 3 Juil 2019
new_var=load('DCS_data.mat')
1 commentaire
and then
T=new_var.whatever(:,1);
heat=new_var.whatever(:,2);
Faezeh Manesh
le 4 Juil 2019
0 votes
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!