大学matlab 不会做啊

Matlab中函数的编制
要求:1、对于在数学学习过程中各类函数的
Matlab绘图,包括但不限于对数函数、指数函
数、三角函数、反三角函数等,并分析函数的
性质;
2、列举编制函数文件的方法,编制一个m函数
文件实现如下功能。
某商场对顾客所购买的商品实行打折销售,标
准如下(商品价格用price来表示):
price<200 没有折扣
200≤price<500 3%折扣
500sprice<1000 5%折扣
1000sprice<2500 8%折扣
2500sprice<5000 10%折扣
5000≤price 14%折扣
输入所售商品的价格,求其实际销售价格。
3、拓展和补充相关Matlab应用方法。

%% 1
x = 0 :0.001:2;
y1 = log(x);
figure(1);
subplot(2,2,1);
plot(x,y1);
subplot(2,2,2);
y2 = exp(x);
plot(x,y2);
subplot(2,2,3);
x3 = 0 :0.001:20;
y3 = sin(x3);
plot(x3,y3);
subplot(2,2,4);
x4 = -1 :0.001:1;
y4 = asin(x4);
plot(x4,y4);
%% 2
function price_actual = sale(price)
    if price < 200
        price_actual = price;
    elseif price >= 200 && price < 500
        price_actual = 0.97 * price;
    elseif price >= 500 && price < 1000
            price_actual = 0.95 * price;
    elseif price >= 1000 && price < 2500
            price_actual = 0.92 * price;
    elseif price >= 2500 && price < 5000
        price_actual = 0.9 * price;
    else
        price_actual = 0.86 * price;
    end
end