How to ROUND the elements of cell array?
16 ビュー (過去 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!