matlab中expand问题>> syms x y;>> expand((x-2)*(x-4))>>expand(cos(x+y))>>expand(exp((a+b)^2))ans =x^2 - 6*x + 8 得出:>>expand(cos(x+y))|Error: Unexpected MATLAB operator. >> >>expand(exp((a+b)^2))得出: >>expand(exp((a+b)^2))|Error: Unexpect

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/11 14:35:27
matlab中expand问题>> syms x y;>> expand((x-2)*(x-4))>>expand(cos(x+y))>>expand(exp((a+b)^2))ans =x^2 - 6*x + 8 得出:>>expand(cos(x+y))|Error: Unexpected MATLAB operator. >> >>expand(exp((a+b)^2))得出: >>expand(exp((a+b)^2))|Error: Unexpect

matlab中expand问题>> syms x y;>> expand((x-2)*(x-4))>>expand(cos(x+y))>>expand(exp((a+b)^2))ans =x^2 - 6*x + 8 得出:>>expand(cos(x+y))|Error: Unexpected MATLAB operator. >> >>expand(exp((a+b)^2))得出: >>expand(exp((a+b)^2))|Error: Unexpect
matlab中expand问题
>> syms x y;
>> expand((x-2)*(x-4))
>>expand(cos(x+y))
>>expand(exp((a+b)^2))
ans =
x^2 - 6*x + 8
得出:
>>expand(cos(x+y))
|
Error: Unexpected MATLAB operator.

>> >>expand(exp((a+b)^2))
得出:
>>expand(exp((a+b)^2))
|
Error: Unexpected MATLAB operator

两个问题应该是一样的,求解答,要怎么做才能让它可以运行?

matlab中expand问题>> syms x y;>> expand((x-2)*(x-4))>>expand(cos(x+y))>>expand(exp((a+b)^2))ans =x^2 - 6*x + 8 得出:>>expand(cos(x+y))|Error: Unexpected MATLAB operator. >> >>expand(exp((a+b)^2))得出: >>expand(exp((a+b)^2))|Error: Unexpect
运行后没有问题,在Matlab2010a通过.请问你使用的版本是多少?
>> syms x y;
>> expand((x-2)*(x-4))
ans =
x^2-6*x+8
>> expand(cos(x+y))
ans =
cos(x)*cos(y)-sin(x)*sin(y)
>> expand(exp((x+y)^2))
ans =
exp(x^2)*exp(x*y)^2*exp(y^2)