How can I add column with for loop
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone
I have this vector
url = {'nam1', 'nam2', 'nam3','nam5', 'name5', 'nam6'};
And I need to do a for loop to add to another 1x6 matriz name by name, I have tried the nexy code
for i = length(xsl)
xsl(:,i)=url;
end
but it return a 6x6 cell array and that is not what Im looking for, can anyone help me?
Thanks
1 Kommentar
Antworten (1)
Ameer Hamza
am 26 Dez. 2020
The question is not clear. Are you looking for something like this
url = {'nam1', 'nam2', 'nam3','nam5', 'name5', 'nam6'};
xsl = cell(1,6);
for i = length(xsl)
xsl(:,i)=url(i);
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!