필터 지우기
필터 지우기

error to get the answer by Kronecker

조회 수: 1 (최근 30일)
Mariam Gasra
Mariam Gasra 2019년 5월 1일
댓글: imrankhan ajees 2019년 5월 1일
function K = kronecker(A,B)
if ~issparse(A) && ~issparse(B)
if ~ismatrix(A) || ~ismatrix(B)
error('kronecker:TwoDInput','Inputs must be 2-D.');
end
% Both inputs are full, result is full. This is faster than
% MATLAB stock kron (indexing based)
[ma, na] = size(A);
[mb, nb] = size(B);
A = reshape(A,[1 ma 1 na]);
B = reshape(B,[mb 1 nb 1]);
K = bsxfun(@times,A,B);
K = reshape(K,[ma*mb na*nb]);
else % One of the input matrix is sparse
% Call MATLAB stock KRON
K = kron(A,B);
end
how can i solve the error ?
  댓글 수: 6
Walter Roberson
Walter Roberson 2019년 5월 1일
Undefined variables lamda1, lamda2, mu1, mu2
You set variables lamda and mu but you do not use them.
You still have not indicated what error you are observing.
imrankhan ajees
imrankhan ajees 2019년 5월 1일
copy the content on the command window after getting the error and post it otherwise we can't help you

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by