Clear Filters
Clear Filters

displaying element of matrix

2 views (last 30 days)
Eram Khan
Eram Khan on 2 May 2021
Commented: Image Analyst on 2 May 2021
How can I display a matrix as output of a function which element are two decimal point based number.

Accepted Answer

Scott MacKenzie
Scott MacKenzie on 2 May 2021
Edited: Scott MacKenzie on 2 May 2021
% assume M is a matrix of numeric values returned by your function
fprintf('%.2f\n', M); % print all the values, 2 decimal places each
  2 Comments
Image Analyst
Image Analyst on 2 May 2021
@Eram Khan, if it did what you want, please "Accept this answer" to award Scott his "reputation points".

Sign in to comment.

More Answers (0)

Categories

Find more on Matrices and Arrays 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!