题目
如何将符号函数转换为矩阵函数
例如pdx1=pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)
如何将其转换成向量函数?sym2poly只能转换含有单一变量的函数
在线等
一共20积分都送出去了,请别嫌弃
例如pdx1=pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)
如何将其转换成向量函数?sym2poly只能转换含有单一变量的函数
在线等
一共20积分都送出去了,请别嫌弃
提问时间:2021-02-22
答案
命令就是下面的,coeffs()
>> syms x1 x2;
>> pdx1=pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)
pdx1 =
pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)
>> coeffs(pdx1)
ans =
[ 1,1]
>> coeffs(pdx1,x1)
ans =
[pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)]
>> coeffs(pdx1,x2)
ans =
[pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)]
matlab解释
COEFFS Coefficients of a multivariate polynomial.
C = COEFFS(P) returns the coefficients of the polynomial P with
respect to all the indeterminates of P.
C = COEFFS(P,X) returns the coefficients of the polynomial P with
respect to X.
[C,T] = COEFFS(P,...) also returns an expression sequence of the
terms of P.There is a one-to-one correspondence between the
coefficients and the terms of P.
Examples:
syms x
t = 2 + (3 + 4*log(x))^2 - 5*log(x);
coeffs(expand(t)) = [ 11,19,16]
syms a b c x
y = a + b*sin(x) + c*sin(2*x)
coeffs(y,sin(x)) = [a + c*sin(2*x),b]
coeffs(expand(y),sin(x)) = [a,b + 2*c*cos(x)]
syms x y
z = 3*x^2*y^2 + 5*x*y^3
coeffs(z) = [5,3]
coeffs(z,x) = [5*y^3,3*y^2]
[c,t] = coeffs(z,y) returns c = [5*x,3*x^2],t = [y^3,y^2]
>> syms x1 x2;
>> pdx1=pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)
pdx1 =
pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)
>> coeffs(pdx1)
ans =
[ 1,1]
>> coeffs(pdx1,x1)
ans =
[pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)]
>> coeffs(pdx1,x2)
ans =
[pi*cos(pi*x1) + pi*cos(pi*x1)*cos(pi*x2)]
matlab解释
COEFFS Coefficients of a multivariate polynomial.
C = COEFFS(P) returns the coefficients of the polynomial P with
respect to all the indeterminates of P.
C = COEFFS(P,X) returns the coefficients of the polynomial P with
respect to X.
[C,T] = COEFFS(P,...) also returns an expression sequence of the
terms of P.There is a one-to-one correspondence between the
coefficients and the terms of P.
Examples:
syms x
t = 2 + (3 + 4*log(x))^2 - 5*log(x);
coeffs(expand(t)) = [ 11,19,16]
syms a b c x
y = a + b*sin(x) + c*sin(2*x)
coeffs(y,sin(x)) = [a + c*sin(2*x),b]
coeffs(expand(y),sin(x)) = [a,b + 2*c*cos(x)]
syms x y
z = 3*x^2*y^2 + 5*x*y^3
coeffs(z) = [5,3]
coeffs(z,x) = [5*y^3,3*y^2]
[c,t] = coeffs(z,y) returns c = [5*x,3*x^2],t = [y^3,y^2]
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
- 1五年级学生参加跳绳比赛,按4人一组或8人一组或6人一组,都正好能分成若干个组.五年级有多少人参加比赛?
- 2时钟6时敲6下,5秒敲完.那么,12时敲12下,需要几秒?
- 3如图所示,三个电阻R1、R2、R3的阻值相同,允许消耗的最大功率分别为10W、10W、4W,此电路中允许消耗的最大功率为( ) A.12W B.15W C.16W D.24W
- 4要求四年级关于仙人掌的作文不少于300字
- 5在三角形ABC中,角BAC=120度,且AB=AC,AD垂直AC,如果E是CD的中点,求证AE=BD
- 6“请考虑一下这个计划”用英语怎么说?
- 7在我们的日常生活中,会遇到各种各样的困难,究竟是我们遇到的困难多,还是遇到困难解决的办法多?
- 8英语翻译
- 9一道正态分布的概率题
- 10标准状况下,1升水中溶解336升氯化氢气体,求所得盐酸的质量百分比浓度.
热门考点
- 1自然老师带我们到野外采用了许多植物标本这病句怎么改
- 2英语翻译
- 3为什么荷叶上的水会变成小水珠?
- 48是4的倍数,9是3的倍数,8和9相邻,15是3的倍数,16是4的倍数,在100中有多少组这样相邻的自然数
- 51、李阿姨把4000元存入银行,存整存整取5年,年利率是4.95%.到期时李阿姨可得利息和本金共多少元
- 6our products sell well,but ten years age ,who could have imagined that they___such a big share in th
- 7点p是正五边形的外接圆上任意一点,求证:PE+PA+PC=PB+PD
- 8一个表面涂满了红颜色的立方体,要想切出100块大小一样,各面都没有颜色的小立方块,至少应在各面切几刀?
- 9六(1)班有54人,男生人数是女生人数的4/5.六一班男女生各有多少人?(列方程解答)
- 10学苑新报人教目标版九年级英语天地第18期答案