M
M
mrsalogub2021-02-20 11:06:49
Data processing
mrsalogub, 2021-02-20 11:06:49

matlab strings and data?

There is an array of strings of type cell containing numbers, characters, and text.
How can I "get" numbers from this array in matlab and convert them into a separate array (matrix).

'static const float delayAcc[8][5]={\'
'{7,0,0,0,0},\'
'{0,1,-0,0,1},\'
'{31.415204, 0.988546,0.154076611, -0.150922,0.988063766} \ '
' {56.547882,0.958443,0.27254987, -0.264937,0.956719985} \ '
' {81.680875,0.91522,0.389675743, -0.380572,0.912877765} \ '
' {106.812724,0.860963, 0.497373735, -0.486562,0.855723432} \ '
' {131.944937,0.797937,0.599260789, -0.585814,0.787671326} \ '
' {157.077792,0.718622,0.688744947, -0.675939,0.706032831} \ '
'}; '
'
'0.000000,1.000000,0.000000,0.000000,1.000000 {} \'
'{31.415927,0.979268,0.149209, -0.140717,0.987642} \'
'{62.831853,0.938760,0.294482, -0.277450,0.953275} \'
'{94.247780 , 0.879281,0.432687, -0.406503,0.897779} \ '
' {125.663706,0.802429,0.560810, -0.524635,0.822499} \ '
' {157.079633,0.710358,0.676043, -0.629194,0.729243} \ '
'}; '

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2021-02-20
@res2001

As far as I know there is no such functionality in matlab.
But you can write it yourself - read the file and do the necessary transformations.
If this is a one-time operation and there is not much data, then it is faster to do it manually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question