matlab中如何把符号多项式转换为数值多项式-(390625*xx*(xx - 1)*(xx + 1)*(xx - 1/5)*(xx + 1/5)*(xx - 2/5)*(xx + 2/5)*(xx - 3/5)*(xx + 3/5)*(xx - 4/5)*(xx + 4/5))/1768是我求得的一个符号函数,如何把它转化为double类型,
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 09:52:50
matlab中如何把符号多项式转换为数值多项式-(390625*xx*(xx - 1)*(xx + 1)*(xx - 1/5)*(xx + 1/5)*(xx - 2/5)*(xx + 2/5)*(xx - 3/5)*(xx + 3/5)*(xx - 4/5)*(xx + 4/5))/1768是我求得的一个符号函数,如何把它转化为double类型,
matlab中如何把符号多项式转换为数值多项式
-(390625*xx*(xx - 1)*(xx + 1)*(xx - 1/5)*(xx + 1/5)*(xx - 2/5)*(xx + 2/5)*(xx - 3/5)*(xx + 3/5)*(xx - 4/5)*(xx + 4/5))/1768
是我求得的一个符号函数,如何把它转化为double类型,从而画出它的图像,(我试过str2double,但不成功),
matlab中如何把符号多项式转换为数值多项式-(390625*xx*(xx - 1)*(xx + 1)*(xx - 1/5)*(xx + 1/5)*(xx - 2/5)*(xx + 2/5)*(xx - 3/5)*(xx + 3/5)*(xx - 4/5)*(xx + 4/5))/1768是我求得的一个符号函数,如何把它转化为double类型,
记该函数为f,用eval语句
完整代码如下
syms xx;
f=-(390625*xx*(xx - 1)*(xx + 1)*(xx - 1/5)*(xx + 1/5)*(xx - 2/5)*(xx + 2/5)*(xx - 3/5)*(xx + 3/5)*(xx - 4/5)*(xx + 4/5))/1768;
xx=-10:0.1:10;
plot(xx,eval(f));