Stuck in an infinite loop when trying to use publish in Matlab

后端 未结 1 1888
庸人自扰
庸人自扰 2021-01-23 16:22
%Question 1 


y=dtmfsig(150006260); 

%a
t= linspace(0,0.9,7200) 
plot(t,y)
title(\'DTMF time signal\')
xlabel(\'t (sec)\') 
ylabel(\' y(t)\' ) 




% Part B

fLH= [697         


        
1条回答
  •  执念已碎
    2021-01-23 16:57

    The command publish executes the script whose name is given, and records the output. Your mistake is inserting this command into the script itself. This results in an infinite loop: the script runs, then at the end encounters publish command, which means it has to run again, so it does, and then encounters publish, etc.

    You should invoke

    publish('lab2question1.m','pdf')
    

    from the command window, not from the script itself.

    0 讨论(0)
提交回复
热议问题