第一
clear all
step = 0.005;
x = 0:step:0.5;
y = log(1-x.^2);
l = sum(sqrt(step^2 + (diff(y)).^2))
第三
function y = sort_s(x)
%x为价格
fx = 0.2*x-8;
if x<80
fx = 80;
end
y = 20*x - fx;
第一
clear all
step = 0.005;
x = 0:step:0.5;
y = log(1-x.^2);
l = sum(sqrt(step^2 + (diff(y)).^2))
第三
function y = sort_s(x)
%x为价格
fx = 0.2*x-8;
if x<80
fx = 80;
end
y = 20*x - fx;