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!

 Akzeptierte Antwort

James Tursa
James Tursa am 9 Jan. 2017
Bearbeitet: James Tursa am 9 Jan. 2017

0 Stimmen

respPreStore = cellfun(@uminus,respPreStore,'uni',false);

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 9 Jan. 2017

Kommentiert:

am 10 Jan. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by