Undefined Variable Error when running Step()
Show older comments
I am using Matlab R2009a student edition at home and Matlab 2012 at school. While I was at school I wrote this snippet of code which worked.
N=1; % Numerator of 1
D=conv([0.07 1],[0.3 1]); % convolving to find the denominator
H=tf(N,D); % finding the transfer function
figure(1) % create figure 1
step(H,'g'); % plot the step response of the 2nd order system
hold on % turn hold on to plot both on same graph
grid on % turn on grid
title('Step Response of 2nd Order Function Vs. 1st Order Approximation')
D1=[0.3 1]; % denominator for 1st order system
H1=tf(N,D1); % transfer function of the 1st order system
step(H1,'r'); % plotting next to the second order system in Red.
I ran it successfully, then saved it to my thumb drive and brought it home. When I try to run it on my personal PC I get the following error:
??? Error using ==> lti.step at 56
Undefined variable "ctrlMsgUtils" or class
"ctrlMsgUtils.SuspendWarnings".
Both computers have the Control Toolbox and say that step() is a supported command. Why would I get the error? This is a pain since now I have to drive back to the college to finish this assignment since I can no longer run any of these commands here. I even looked for sample code to try for the step command and I get the same error. THanks in advance.
1 Comment
Craig
on 18 Mar 2013
Hi,
Can you do the following to help diagnose this issue.
1. Can you type Ver on the installation you are having an issue with and reply back with the result?
2. Can you check to make sure the following file exists in your installation: matlab\toolbox\shared\controllib\+ctrlMsgUtils\SuspendWarnings.m exists in your installation? If not this is most likely an installation issue.
Thanks
Answers (0)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!