Unable to perform assignment because the left and right sides have a different number of elements.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Kanika Bhalla
am 8 Okt. 2020
Kommentiert: Kanika Bhalla
am 9 Okt. 2020
for i=1:100
s_code1(i)=strcat(s_code(2*i-1,:),s_code(2*i,:));
end
c1=cross(s_code1,100);
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Ameer Hamza
am 8 Okt. 2020
If you are using R2016b or later, you can also try the following
s_code1 = strings(1, 100)
for i=1:100
s_code1(i)=strcat(s_code(2*i-1,:),s_code(2*i,:));
end
3 Kommentare
Ameer Hamza
am 8 Okt. 2020
Can you share the value of s_code in a .mat file? Also, can you paste the code you tried running?
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!