I don't know why MATLAB appears such a error message when debug this program,but in my friend's machine,the program can be debugged successfully.thank you!

The only error message is"??? Undefined command/function 'circle'."
clear; close all; clc; N=20; m=10; n=0:1:N-1; x=8*(0.4).^n; n1=mod((n+m),N); xm=x(n1+1); subplot(2,1,1); stem(n,x); title('original squence'); xlabel('n'); ylabel('x(n)'); subplot(2,1,2); stem(n,xm); title('circular shift squence'); xlabel('n'); ylabel('x((n+10))mod20');

 채택된 답변

Undefined command/function 'circle'."
Means that matlab cannot find function/command 'circle'.
Please check where this function is defined.
Also code which you have pasted does not refer any function named 'circle'.
Hope it helps!!

댓글 수: 4

I don't not find the function definition from HELP menu.Also,I have asked my friend whose computer can be debugging the program, to get the function definition from his computer,but he said he can not gen any information from HELP menu.
Where your code .m file is located, also what is its name & are there any spaces in it?
Oh,my god!There is apace in my file's name,but in the past I had never knew that the name of M-file cannot include a space.I was so careless.Thank you very much!
But why did it work on your friend's computer? It should not have worked there either.

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

추가 답변 (1개)

Type
>> which -all circle
on both your computer and your friends computer. Then compare what it prints in the command window. Tell us what they both say.

댓글 수: 1

Thank you very much all the same!I had found my mistake,I name the M-file with a space.In the past,I never knew that the name of M-file cannot include a space.It is ridiculous,isn't it?

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

카테고리

도움말 센터File Exchange에서 Clocks and Timers에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by