필터 지우기
필터 지우기

Differentiation of a data inside a Cell array

조회 수: 2 (최근 30일)
Amit Chakraborty
Amit Chakraborty 2022년 6월 4일
답변: Walter Roberson 2022년 6월 4일
I have cell array called "s". Inside it there is only one data matrix. I need to do differentiation ( derivative) of that data ( which was inside the cell array s) with respect to the length of thr p matrix. To do the differentiation I used the following process. Is my approach correct ?
Thanks in ADVANCE !!
s = {rand(15,5)};
t = cell2mat(s);
a = diff(t);
p = [1 2 3];
q = a/length(p); % dx/dy form
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 6월 4일
How does changes in the length of p cause t to behave differently? I would understand if p was the same length as the rows or columns, but it is not.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2022년 6월 4일
I suspect that what you want is
q = gradient(p, s{1})

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by