matrix Combine difference size
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Gülsah Çifçi
il 8 Ago 2021
Commentato: Gülsah Çifçi
il 8 Ago 2021
Datas=[3.9717, 10.9791, 14.4306, 16.6604,16.5421, 13.9692; 5.9904, 10.2624, 14.3976, 16.5259, 16.5860, 13.8606]
allDataX=zeros(7,45)
for i=1:44
allDataX(:,i)=[i;Rss']
end
But Datas change size ı cant do.How can ı do
0 Commenti
Risposta accettata
Walter Roberson
il 8 Ago 2021
I am having to guess about what you are trying to do.
Datas=[3.9717, 10.9791, 14.4306, 16.6604,16.5421, 13.9692; 5.9904, 10.2624, 14.3976, 16.5259, 16.5860, 13.8606]
allDataX = zeros(size(Datas,2)+1,size(Datas,1));
for i=1:size(Datas,1)
allDataX(:,i)=[i;Datas(i,:).'];
end
allDataX
Or...
allDataX = [1:size(Datas,1); Datas.'];
allDataX
3 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Resizing and Reshaping Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!