MATLAB Answers

adjmat unrecognized function in Matlab

조회 수: 65(최근 30일)
Diana
Diana 15 Feb 2021
답변: Jian Yuan 19 Mar 2021 10:36
I'm trying to run a code and it has the function
t5 = diff(lambda);
t5 = adjmat(t5);
but I got the error that adjmat unrecognized function , so what is the problem?
  댓글 수: 6
Walter Roberson
Walter Roberson 15 Feb 2021
At the top of your function put in
adjmat = @(M) mat2gray(M);

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

답변(2개)

Matt J
Matt J 15 Feb 2021
Is adjmat supposed to be computing the adjugate of the matrix t5. If so, you might be able to use this instead,

Jian Yuan
Jian Yuan 19 Mar 2021 10:36
After diff function, the dimention of an array decreased by 1. I checked here Adjmat(t5) seems to align that. So you may try t5(:,1) = [] to replace t5 = adjmat(t5).

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by