масштаб

clear;
x=0:0.01:12;
k=0;
q=100;
color =['r','y-','g-'];
while k~=5
    k=menu('select','first','second','third','scale defenition','exit');
    H=besselj(k,x);
    if k==4 
        q=inputdlg('choose');
        end;
    if k~=5 & k~=4 plot(x(1:q),H(1:q),color(k)); end; 
    q=100;
end;
hold off
close;

максимум

clear;
clf;
x=-3:0.01:3;
y=exp(-x.^2);
extremY=max(y);
plot(x,y,'-m');
xlabel (sprintf('values of x from %4.1f to %4.1f', min(x), max(x)));
ylabel('Y'); 
text(0,extremY*0.95, 'Thise');
figure(gcf);
hold off;

цилиндрическая лямбда-функция.

clear;
x=0:.01:12;
k=0;
color=['r','y-','g-'];
factrl=[1;2;6];
while k~=4
    k=menu('Select','1st','2st','3st','exit');
    if (k==4) break; end;
    lmbd=besselj(k,x)*factrl(k)*2.^k./(x.^k+eps);
    hold on;
    plot(x,lmbd,color(k));
end;
close;

работа с функцией

%myfunc.m
function[yy,yyl]=myfunc(xx,omega);
yy=sin(xx*omega);
yyl=exp(-xx/5).*yy;

%proba.m
clear;
x=0:.05:8*pi;
omeg=input('frequency=');
y=zeros(size(x));
y1=zeros(size(x));
[y,y1]=myfunc(x,omeg);
plot(x,y);
hold on;
plot(x,y1);