Swap number with a word
    4 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hi all,
I am wondering how I could swap a number in a vector with a word. I have a vector from 1 to 100 ( linspace(1,100) ) and am trying to replace every fourth number with a word "height". Any suggestion on how to do this?
Thanks.
0 件のコメント
採用された回答
  Birdman
      
      
 2018 年 3 月 7 日
        a=string(linspace(1,100));
a(4:4:end)=regexprep(a(4:4:end),'\d*','height')
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
				Help Center および File Exchange で Logical についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!