How to ROUND the elements of cell array?
11 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Paul
2022-9-11
% example data
rng(100)
child.x ={rand(1,3)};
format long
child.x
round(child.x{1},3)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!