求MATLAB大神指导
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/07/04 06:05:58
求MATLAB大神指导
>> syms c x; a=int((exp(x)-c*x)^2,x,0,1);
f=diff(a,c)
f =
(2*c)/3 - 2
>> c=solve('(2*c)/3 - 2=0')
c =
3
怎么一步计算出结果?
>> syms c x; a=int((exp(x)-c*x)^2,x,0,1);
f=diff(a,c)
f =
(2*c)/3 - 2
>> c=solve('(2*c)/3 - 2=0')
c =
3
怎么一步计算出结果?
![求MATLAB大神指导](/uploads/image/z/8363928-48-8.jpg?t=%E6%B1%82MATLAB%E5%A4%A7%E7%A5%9E%E6%8C%87%E5%AF%BC)
>> c=solve(diff(int('(exp(x)-c*x)^2','x',0,1),'c'))
c =
3
再问: >> syms x c;solve(diff(int('(exp(x)-c*x)^2','x',0,1),'c')) Error using char/int (line 9)The method char/int will be removed in a futurerelease. Use sym/int instead. For exampleint(sym('x^2')).
再答: ����Ҫ��syms�����ű�����ֱ����Ϳ����ˣ� c=solve(diff(int(sym('(exp(x)-c*x)^2'),'x',0,1),'c'))
c =
3
再问: >> syms x c;solve(diff(int('(exp(x)-c*x)^2','x',0,1),'c')) Error using char/int (line 9)The method char/int will be removed in a futurerelease. Use sym/int instead. For exampleint(sym('x^2')).
再答: ����Ҫ��syms�����ű�����ֱ����Ϳ����ˣ� c=solve(diff(int(sym('(exp(x)-c*x)^2'),'x',0,1),'c'))