division of factor in polynomial

조회 수: 4 (최근 30일)
Howard Padmore
Howard Padmore 2023년 6월 11일
댓글: Dyuman Joshi 2023년 6월 12일
using sym I ended up with the following polynomial in y and x with terms x^2, x^4, x^2, y^4
(4*R^3*r^2*y^2 + R^3*y^4 + 4*R^2*r^3*x^2 + 2*R*r^2*x^2*y^2 + r^3*x^4)/(8*R^3*r^3)
I would like to divide the expression by the denominator 8*R^3*r^3, so for example the 1st term would say appear as y^2/(2*r)
Anyone know how to do this?

채택된 답변

Walter Roberson
Walter Roberson 2023년 6월 11일
expr = str2sym('(4*R^3*r^2*y^2 + R^3*y^4 + 4*R^2*r^3*x^2 + 2*R*r^2*x^2*y^2 + r^3*x^4)/(8*R^3*r^3)')
expr = 
expand(expr)
ans = 
  댓글 수: 2
Howard Padmore
Howard Padmore 2023년 6월 12일
Perfect. Many thanks for the fast reply.
Dyuman Joshi
Dyuman Joshi 2023년 6월 12일
@Howard Padmore if this answer solved your problem, please consider accepting it.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by