Very simple mathworks own example code from website will not run
Show older comments
Matlab has posted this example code found here
and yet it won't run
anyone has any ideas?????????
this is grossly frustrating when mat labs very own examples will not run on their own software.
H = tf([2 5 1],[1 3 5]);
pzmap(H)
grid on
Error as follows
Error using DynamicSystem/pzmap
Plots must be of the same type and size to be superimposed.
Error in PoleZeroPlotOfDynamicSystemExample (line 8)
pzmap(H)
6 Comments
dpb
on 2 Oct 2016
Possibly a revision-level issue, I'd guess. What release of ML are you using and is the example in your local doc as well as the current revision if you're on an earlier release. I don't have the toolbox so can't try it out here...
Stephen23
on 2 Oct 2016
@Robert: please show us the output of this command:
ver
Walter Roberson
on 2 Oct 2016
As a data point: the above works fine for me in R2015a and R2016b on OS-X. If you indicate the version you are using, I might be able to test it out (though it is a bit difficult for me to run anything earlier than R2012a)
Robert
on 7 Oct 2016
Walter Roberson
on 7 Oct 2016
Data point: the reported problem does not happen to me in Windows 10 in R2015a or R2016b.
Walter Roberson
on 8 Oct 2016
Data point: the reported problem does not happen to me in Windows 10 in R2015b.
Please be specific about which operating system you are using, and please double-check which MATLAB release it is failing in for you and verify that it is still failing for you.
Please also experiment with
restoredefaultpath
in case one of your own .m files is interfering.
Answers (1)
Brandon Eidson
on 7 Oct 2016
1 vote
Hello Robert,
I have tested the example you listed on releases as far back as R2008a. All have run without an error.
I have seen a similar error before that was fixed by completely uninstalling and reinstalling MATLAB. I recommend trying the same.
Short of that, you might simply try resetting MATLAB preferences by using the following steps.
- Find your preferences directory by typing "prefdir" in the MATLAB Command Window.
- Exit MATLAB and delete the directory found under point 1.
- Start MATLAB again.
If that doesn't work, go with the complete uninstall/reinstall approach.
Categories
Find more on Reporting and Database Access 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!