フィルターのクリア

Question using fprintf for words

4 ビュー (過去 30 日間)
benny
benny 2014 年 11 月 20 日
編集済み: Image Analyst 2014 年 11 月 21 日
I know how to use fprintf for a string of numbers but I was wondering if there is way to assign it to variable or words such as
A= ['jan','feb','march','april']
fprintf('% \n',A)
to get output
jan
feb
march
april

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 20 日
編集済み: Azzi Abdelmalek 2014 年 11 月 20 日
A= {'jan','feb','march','april'};
fprintf('%s \n',A{:})

その他の回答 (1 件)

Chad Greene
Chad Greene 2014 年 11 月 20 日
Curly brackets and disp would be a different way:
A= {'jan','feb','march','april'}
disp(A)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by