The upsample function is not working R2022b

조회 수: 5 (최근 30일)
Louis Tomczyk
Louis Tomczyk 2022년 9월 25일
댓글: Star Strider 2022년 9월 25일
Dear all,
For some reasons I had to reboot my machine and reinstalled Matlab, version 2022b.
I tried to run my previous and validated program but the function is raising an issue of type of the input arguments, which never happened before...
Even the examples of the help page do not work:
x = [1,2,3,4];
y = upsample(x,2)
y = 1×8
1 0 2 0 3 0 4 0
So I am a bit pissed off...
Anyone has suggestions?
Thanks a lot in advance.
Best regards,
louis tomczyk
  댓글 수: 2
Steven Lord
Steven Lord 2022년 9월 25일
What does "not working" mean in this context?
  • Do you receive warning and/or error messages? If so the full and exact text of those messages (all the text displayed in orange and/or red in the Command Window) may be useful in determining what's going on and how to avoid the warning and/or error.
  • Does it do something different than what you expected? If so, what did it do and what did you expect it to do?
  • Did MATLAB crash? If so please send the crash log file (with a description of what you were running or doing in MATLAB when the crash occured) to Technical Support so we can investigate.
Louis Tomczyk
Louis Tomczyk 2022년 9월 25일
Dear @Steven Lord, I mentionned 'type of the input arguments".
I checked both int8 and double class do not work for the second argument, see attached the screenshot.
Thanks again.

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

채택된 답변

Star Strider
Star Strider 2022년 9월 25일
I can find two upsample functions in the online documentation, one in the Signal Processing Toolbox (that should work with your code) and another one in the Control System Toolbox that will definitely not work with the posted code, since it requires a ‘system’.object as the first argument.
x = [1,2,3,4];
y = upsample(x,2) % Signal Processing Toolbox 'upsample'
y = 1×8
1 0 2 0 3 0 4 0
Be certain that you have the Signal Processing Toolbox licensed and installed.
If you have it and you are still getting the error, run:
which upsample -all
/MATLAB/toolbox/signal/signal/upsample.m /MATLAB/toolbox/control/ctrlmodels/@DynamicSystem/upsample.m % DynamicSystem method /MATLAB/toolbox/signal/signal/@gpuArray/upsample.m % gpuArray method
from a script or the Command Window. The result should look something like this.
If there is anything else, it would reveal a user-written function that is overshadowing the one you want to use. The solution is to rename the user-written function to something that makes sense in the context of your code and does not match any built-in MATLAB function names.
  댓글 수: 2
Louis Tomczyk
Louis Tomczyk 2022년 9월 25일
@Star Strider that's exactly this.
Thanks a lot.
@Steven Lord Thanks also, I'll try to be more explicit next time.
Star Strider
Star Strider 2022년 9월 25일
As always, my pleasure!

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

추가 답변 (0개)


Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기





Community Treasure Hunt

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

Start Hunting!

Translated by