this is my code, and i will attach in the comments what i am trying to portray. I'm having trouble understanding why it wont work. Thanks

 Akzeptierte Antwort

David Hill
David Hill am 28 Feb. 2020

0 Stimmen

fprintf('%15.4f %15.4f %15.4f %15.4f\n',M(1,:),M(2,:),M(3,:),M(4,:));

8 Kommentare

fprintf('%15.4f %15.4f %15.4f %15.4f\n',M');
Charlotte Reed
Charlotte Reed am 28 Feb. 2020
Charlotte Reed
Charlotte Reed am 28 Feb. 2020
Just copy and paste!
fprintf('%15.4f %15.4f %15.4f %15.4f\n',M');%M transpose (M')
Walter Roberson
Walter Roberson am 28 Feb. 2020
Not 'M' but just M'
Charlotte Reed
Charlotte Reed am 28 Feb. 2020
Charlotte Reed
Charlotte Reed am 28 Feb. 2020
The only problem is the table lines aren't there
... so add them in?
L15 = repmat('-', 1, 15);
fprintf('%s %s %s %s\n', L15, L15, L15, L15);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by