I want to get the numbers from the cell below and have them as a Matrix:
A =
'1.39675e-02 -2.58099e-01 -8.32728e-03 0.00000e+00 2.19518e+01 1.21930e-01 0.00000e+00 3.00000e-05 3.00000e+02 9.98200e+02 1.41117e-11 '

1 Kommentar

More efficient than STR2NUM:
V = sscanf(A,'%f')
V = 11×1
0.0139675 -0.258099 -0.00832728 0 21.9518 0.12193 0 3e-05 300 998.2

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

the cyclist
the cyclist am 7 Mai 2021

0 Stimmen

A = '1.39675e-02 -2.58099e-01 -8.32728e-03 0.00000e+00 2.19518e+01 1.21930e-01 0.00000e+00 3.00000e-05 3.00000e+02 9.98200e+02 1.41117e-11 ';
Anum = str2num(A)
Anum = 1×11
0.0140 -0.2581 -0.0083 0 21.9518 0.1219 0 0.0000 300.0000 998.2000 0.0000

Weitere Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by