Borrar filtros
Borrar filtros

Is it possible somehow to make angled brackets to struct?

6 visualizaciones (últimos 30 días)
Martin
Martin el 5 de En. de 2018
Editada: Birdman el 5 de En. de 2018
Hello, I have a data response set that looks like this in workspace (below value): '[[123,456,789],[321,654,987],[231,564,897]]' and so on (its just much much bigger)... If I look inside it, its one cell just without the ''. Is there any way to make such a value to a struct or a 3x3 double? Remember it can be much bigger. The same logic of the output applies to the json format.

Respuesta aceptada

Birdman
Birdman el 5 de En. de 2018
Editada: Birdman el 5 de En. de 2018
I do not understand the data type exactly, but if it is a cell, then use cell2mat to convert it to double.
reshape(cell2mat(a),3,3).'
If it is string (I say this because of ') then use
reshape(str2num(a),3,3).'

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by