"Computer-Based Exercises for Signal Processing using MATLAB 5"

7 次查看(过去 30 天)
Recently I came across a copy of this 1998 book, and noticed that there is a collection of code for it on this site:
Before I start tinkering with it, can anyone suggest if I'm likely to run into problems trying to run the code on a current-day MATLAB version? A readme file indicates, "The M-files are compatible with MATLAB Version 5 and the Signal Processing Toolbox v4." However, the page at the link above describes it as "Created with R10, Compatible with any release."
  2 个评论
John D'Errico
John D'Errico 2023-7-15
Literally impossible to say for sure. A good guess is you might be safe, MOSTLY. Might there be some issues? Possibly, as there have been some changes made to some tools. But for a purely computational code, even 25 years old, I would guess you are usually safe. I'd worry, if there were graphics calls made.
But what can it cost to try? It sounds like you have access to the book and the code. The main downside I would see is it won't cover new capabilities of those tools.

请先登录,再进行评论。

采纳的回答

Sulaymon Eshkabilov
In general, MATLAB/Simulink package functions, and blocks are mostly forward compatible that means older versions would run in a later version of the package. BUT as John mentioned there will be some inconsistencies. One of the few that I happened to come across is: legend()
% In older versions of MATLAB before 2011 or so:
t=linspace(0,3*pi);
F1 = sin(t);
F2 = cos(t);
plot(t,F1, 'r', t, F2, 'b-')
% legend('sin(t)', 'cos(t)', 1) % Places a legend in Northeast of the Figure
% BUT in later versions, this syntax does not work
% Prompts an error: Error using legend
%% Instead, you should use the following syntax:
legend('sin(t)', 'cos(t)', 'location', 'Northeast') % Puts legend in Northeast or so

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Legend 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by