displaying element of matrix

1 次查看(过去 30 天)
How can I display a matrix as output of a function which element are two decimal point based number.

采纳的回答

Scott MacKenzie
Scott MacKenzie 2021-5-2
编辑:Scott MacKenzie 2021-5-2
% 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 个评论
Image Analyst
Image Analyst 2021-5-2
@Eram Khan, if it did what you want, please "Accept this answer" to award Scott his "reputation points".

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by