How to ROUND the elements of cell array?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rounak Saha Niloy
am 11 Sep. 2022
Beantwortet: Paul
am 11 Sep. 2022
I have the followin struct with field.
K>> child
child =
struct with fields:
x: {[3×9 double]}
K>> child.x
ans =
1×1 cell array
{3×9 double}
How do I round the contents of child.x upto 3 decimals?
0 Kommentare
Akzeptierte Antwort
Paul
am 11 Sep. 2022
% example data
rng(100)
child.x ={rand(1,3)};
format long
child.x
round(child.x{1},3)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Structures finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!