help clarifying why code isn't working

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

 Accepted Answer

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

8 Comments

fprintf('%15.4f %15.4f %15.4f %15.4f\n',M');
Just copy and paste!
fprintf('%15.4f %15.4f %15.4f %15.4f\n',M');%M transpose (M')
Not 'M' but just M'
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);

Sign in to comment.

More Answers (0)

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!