Undefined operator '-' for input arguments of type 'cell'

Smoothed_XY is a cell array of n number of rows and 2 columns. All what it cotains are double variables.
I try to run this line:
xd = (Smoothed_XY{i,1}(3:end,1) - Smoothed_XY{i,1}(1:end-2,1)) / (2*Ds) ;
where i is a counter in a loop.
It runs without any problem in a single code, but when it is in a function part of another code, this error appears:
"Undefined operator '-' for input arguments of type 'cell'".
Yes, it seems silly, but that what I find.

Answers (1)

Hi Hazem,
Just looking at your provided one command line, only intuitive concern might be with an improper call function name or location of your set sub- or nested fucntions. Without looking at your whole code, it is a bit difficult to say any solid points.

Categories

Products

Release

R2016a

Community Treasure Hunt

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

Start Hunting!