I came over an old piece of code which I would like to make work with Matlab2016a.
partw is a MbyMby3 Matrix [1729, 1729, 3], type double.
In the code the following lines generate an error message in Matlab2016a.
partw=double(rescale(partww));
partwg=rgb2gray(double(rescale(partw)));
Undefined function 'rescale' for input arguments of type 'double'.
The code should have been functional as is given the version of Matlab that was used at the time (around 2010). So I need to change the rescale function to work with the type double - assuming there is another function I should use now instead.
Regards

 채택된 답변

Star Strider
Star Strider 2016년 6월 21일

1 개 추천

The only rescale function in the online documentation is in the Fixed Point Designer Toolbox. The one you want may be a user-written function that you’ll have to find wherever your found the code you’re using.

댓글 수: 4

Joel
Joel 2016년 6월 21일
Thanks! That is a really good point. I will investigate.
I had a quick look in the archived Matlab documentation (from the Matlab versions available at around 2010), and did not come up with something new. So you are probably right.
I will accept your answer if it turns out to be the case.
Star Strider
Star Strider 2016년 6월 21일
편집: Star Strider 2016년 6월 21일
My pleasure!
EDIT If you’re working with images, and you know what the ‘rescale’ call is supposed to do, you might want to substitute an imresize call instead. (It was introduced before R2006a.)
Joel
Joel 2016년 6월 22일
Another good point, cheers!
It turned out you were correct and the code now works properly with the user defined function rescale.
Star Strider
Star Strider 2016년 6월 22일
My pleasure!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

질문:

2016년 6월 21일

댓글:

2016년 6월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by