Undefined function or variable 'cellmat'.

조회 수: 11 (최근 30일)
Saty
Saty 2018년 6월 12일
댓글: Walter Roberson 2018년 6월 13일
I am new to matlab and trying to run some existing code that other developers can run without any issues but on my machine it gives below error. I have not found any suitable explanation to resolve this in documentation of other forum. I am using R2017a.
Undefined function or variable 'cellmat'.
Error in **** (line 74)
** = cellmat(abc,k);
Error in *** (line 32)
***
Error in *** (line 136)
Please advise.
Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2018년 6월 12일
cellmat appears to be part of the Neural Network toolbox.
If abc and k are scalar values, then cellmat(abc,k) would be the same as
repmat({0}, abc, k)
  댓글 수: 2
Saty
Saty 2018년 6월 13일
Thanks, so does it mean this tool box is not enabled for me, how do i do that? Thanks!
Walter Roberson
Walter Roberson 2018년 6월 13일
It sounds as if the toolbox is not licensed for you, or not installed for you.
If your code uses cellmat() then it might use other functions from the Neural Network toolbox, in which case you would need to obtain the toolbox.
However, sometimes people happen to use a utility routine from a toolbox in code not related to the toolbox. If your code has nothing to do with Neural Network work, then instead of installing the toolbox, you code replace this particular utility routine invocation with a file cellmat.m
function r = cellmat(A, B)
r = repmat({0}, A, B);

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

카테고리

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

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by