Question using fprintf for words
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
benny
am 20 Nov. 2014
Bearbeitet: Image Analyst
am 21 Nov. 2014
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
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 20 Nov. 2014
Bearbeitet: Azzi Abdelmalek
am 20 Nov. 2014
A= {'jan','feb','march','april'};
fprintf('%s \n',A{:})
0 Kommentare
Weitere Antworten (1)
Chad Greene
am 20 Nov. 2014
Curly brackets and disp would be a different way:
A= {'jan','feb','march','april'}
disp(A)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!