文字列の行列を作りたい。
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
パンダ
le 19 Nov 2021
Réponse apportée : Hernia Baby
le 19 Nov 2021
文字列の行列をfor文で作りたいです。具体的に言うと縦7500横1で1から2500までnomal,2500から5000までright,5001から7500までleftという文字を入れたいです。
0 commentaires
Réponse acceptée
Hernia Baby
le 19 Nov 2021
string型なら足し算でいけます
str = ("Sample"+char('0'+(0:60)'));
str(1:20)=str(1:20)+"normal";
str(21:40) = str(21:40)+"right";
str(41:60) = str(41:60)+"left";
str(1:5)
str(21:25)
str(41:45)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!