Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

could anyone help me how to remove the zeros that comes after the number present after the decimal

2 Ansichten (letzte 30 Tage)
how to display the matrix by removing the zeros that comes after the number.
[ 0 0.5800 1.3300 2.5300 2.1200 1.8100;
0.5800 0 1.8600 2.6100 2.4800 1.5300;
1.3300 1.8600 0 2.1800 1.1900 2.4200;
2.5300 2.6100 2.1800 0 1.2300 1.6200;
2.1200 2.4800 1.1900 1.2300 0 2.2400;
1.8100 1.5300 2.4200 1.6200 2.2400 0]
I want to have the matrix in the folowing manner
[ 0 0.58 1.33 2.53 2.12 1.81;
;;
;;
;;
;;
1.81 1.53 2.42 1.62 2.24 0]
could anyone please help me on it.

Antworten (1)

Stephan
Stephan am 22 Okt. 2019
Bearbeitet: Stephan am 22 Okt. 2019
Use
format shortG:
A =
12.3400 2.3400
>> format shortG
>> A
A =
12.34 2.34

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by