필터 지우기
필터 지우기

creating a coefficient matrix for a polynomial

조회 수: 1 (최근 30일)
Parth Jain
Parth Jain 2020년 3월 23일
댓글: Parth Jain 2020년 4월 1일
I have a function f(x) = a_0 +a1*x+a2*x^2+a3*x^3
I need to create a matrix such that
row 1 contains f(0) term as first element and other terms as 0 0 0
row 2 is coefficients of differentiation of f(x) at 0 which would be 0 1 0 0
row 3 is coefficients of f(x) at x = L i.e [1 L L^2 L^3]
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 3월 23일
The differentiation of f(x) at 0: f' would be a1+2*a2*x+3*a3*x^2 and evaluated at 0 that would be a1, not 1
Anyhow, go ahead and create the matrix; you have already given instructions on how you want to built it.
Perhaps the hint you need is: coeffs() ?
Parth Jain
Parth Jain 2020년 4월 1일
hi walter.
yea this worked haha

댓글을 달려면 로그인하십시오.

채택된 답변

Sai Veeramachaneni
Sai Veeramachaneni 2020년 3월 26일
Adding to Walter comment you can also try creating required matrix leveraging syms , coeffs , diff.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by