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.

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020년 9월 7일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2016a

질문:

2020년 9월 6일

답변:

2020년 9월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by