フィルターのクリア

How to change sign in a cell?

2 ビュー (過去 30 日間)
Xh Du
Xh Du 2017 年 1 月 9 日
コメント済み: Xh Du 2017 年 1 月 10 日
Hi all:
I have a cell 'respPreStore' like this:
size(respPreStore)
ans =
1 2 5 2
each cell element is
respPreStore(:,:,1,1) =
[12x4 double] [12x4 double]
Now I simply want to change sign of each value in respPreStore, however if I do:
-respPreStore
Undefined function 'uminus' for input arguments of type 'cell'.
How can I change sign of each value in respPreStore?
Many thanks!

採用された回答

James Tursa
James Tursa 2017 年 1 月 9 日
編集済み: James Tursa 2017 年 1 月 9 日
respPreStore = cellfun(@uminus,respPreStore,'uni',false);
  1 件のコメント
Xh Du
Xh Du 2017 年 1 月 10 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by