MATLAB: Run old matlab programm about human cochlea

software review

Hello. I found an old program about the human cochlea. So I started trying to run the software on Matlab R2017a.
Unfortunately, I am not able to start the program run_me. m. I tried to start the program tw.m to. To see some traveling waves (TW). But also not possible. The code of the run_me. m program is:
%________________________________________________________________________
%
% THE HUMAN COCHLEA IN THE LINEAR APPROXIMATION
%_________________________________________________________________________
clear all
clear functions
home
help run_me
disp( ' ');
disp(' Hit a key to continue ...');
pause
home
mfiles= ['geoplots '
'phyplots; '
'tw; '
'tw(1); '
'tw(1.12); '
'greenf((1:300)/300, 1);'
'g0((1:300)/300, 1); '
'gpeaks((1:300)/300,1); '
'tmplots; '
];
helps= ['help geoplots'
'help phyplots'
'help tw '
'help tw '
'help tw '
'help greenf '
'help g0 '
'help gpeaks '
'help tmplots '
];
descriptions = [
' 0) Exit '
' 1) Geometrical parameters of the cochlear partition [GEOPLOTS.M] '
' 2) Physical parameters of the cochlear partition [PHYPLOTS.M] '
' 3) Travelling wave (TW) profiles in the passive cochlea [TW.M] '
' 4) TW profiles in the active cochlea (absolute viscosity neutralised) [TW.M] '
' 5) TW profiles in the active cochlea (absolute viscosity overcompensated) [TW.M] '
' 6) Green''s function profiles of hydrodynamic coupling [GREENF.M] '
' 7) Unshaped coarse Green''s function profiles [G0.M] '
' 8) Green''s function singularity profiles [GPEAKS.M] '
' 9) Tectorial membrane resonance properties [TMPLOTS.M] '
];
while 1,
disp(' MENU OF DEMONSTRATIONS:');
disp(' ');
disp(descriptions);
n = input(' Select a number: ');
disp(' ');
if ((n <= 0) || (n > 9)),
break
end
if n ~=[],
hlp = helps(n,:);
mfile = mfiles(n,:);
home
disp('________________________________________________________________________');
% disp(' FILE INFORMATION:');
disp([' COMMAND LINE CALL: ', mfile]);
eval(hlp)
disp('________________________________________________________________________');
disp(' ');
disp([' Hit a key to run ', upper(mfile)]);
pause
close
home
eval(mfile)
end
home
end
I attached the file. Not sure if it is only a question of the version. The data are from 1996. If I press a number like 3 I get no return.
Best regards Henrik

Best Answer

The first problem was that it was doing a test n~=[] . In modern MATLAB that test is never true, and ~isempty(n) needs to be used instead.
There were other minor problems with the code. I have attached repaired code.