Data .mat of three different variables x,y,z . Each variable has a list, I need to save those lists in form of matrices [x1,y1,z1] , [x2,y2,z2], etc.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
dx=(Sub3.Left.Vel(:,1)); %import data x in form of column
dxt=dx.'; %from column to list
dy=Sub3.Left.Vel(:,2); %import data y in form of column
dyt=dy.'; %from column to list
dz=Sub3.Left.Vel(:,3); %import data z in form of column
dzt=dz.'; %from column to list
dxdt=zeros(3,1); %Matrix of form 1x3
dxdt=[dxt;dyt;dzt]; %Save dxt in 1x1 matrix postion, save dyt in 2x1 matrix postion, dzt in 3x1 matrix postion
2 commentaires
Adam Danz
le 15 Fév 2021
No need to preallocate: dxdt=zeros(3,1);
Are you getting an error? What's the problem?
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables 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!