Filter löschen
Filter löschen

displaying element of matrix

2 Ansichten (letzte 30 Tage)
Eram Khan
Eram Khan am 2 Mai 2021
Kommentiert: Image Analyst am 2 Mai 2021
How can I display a matrix as output of a function which element are two decimal point based number.

Akzeptierte Antwort

Scott MacKenzie
Scott MacKenzie am 2 Mai 2021
Bearbeitet: Scott MacKenzie am 2 Mai 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 Kommentare
Eram Khan
Eram Khan am 2 Mai 2021
thank you sir.
Image Analyst
Image Analyst am 2 Mai 2021
@Eram Khan, if it did what you want, please "Accept this answer" to award Scott his "reputation points".

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help 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