filling the cells of a column of strings

1 回表示 (過去 30 日間)
antonet
antonet 2012 年 5 月 27 日
Dear all,
I have a column of string variables
'01-01-2001'
'23-11-2008'
'21-12-2008'
'18-01-2009'
and I want to fill the 1rst, 40th, 79th and so forth position of this column as follows
for j=1:hhhh*qqqq*uuu
mdata1{39*j-38,11}='01-01-2001';
end
but it is too slow. Any quicker code?
thanks

採用された回答

Oleg Komarov
Oleg Komarov 2012 年 5 月 27 日
You don't need a for loop:
mdata1(1:39:hhhh*qqqq*uuu,11) = {'01-01-2001'};
  1 件のコメント
antonet
antonet 2012 年 5 月 27 日
thank you oleg

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by