fprintf for printing a matrix
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aftab Ahmed Khan
am 5 Jun. 2014
Bearbeitet: Cedric
am 5 Jun. 2014
Hi, I have a matrix name BS_channelTable of size (5,25) containg only zeros and ones. I want to print its element using a single fprintf command.
Just like if i just use the matrix name BS_channelTable in the command window.
7 Kommentare
Akzeptierte Antwort
Star Strider
am 5 Jun. 2014
This works:
fid = 1; % Insert true ‘fid’
BS_channelTable = randi([0 1], 5, 25); % Create data
fprintf(fid, [repmat(' %d ', 1, 25) '\n'], BS_channelTable')
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB 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!