Borrar filtros
Borrar filtros

displaying element of matrix

2 visualizaciones (últimos 30 días)
Eram Khan
Eram Khan el 2 de Mayo de 2021
Comentada: Image Analyst el 2 de Mayo de 2021
How can I display a matrix as output of a function which element are two decimal point based number.

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by