how to write matlab code for the equation

댓글 수: 4

Why don't you try something yourself first? I would recommend writing parts of your equation as separate functions and combining them like this:
%instead of y=@(x) x.^2 + sqrt(sin(x.^3))
part1=@(x) x.^2;
part2=@(x) sqrt(sin(x*part1(x)));
y=@(x) part1(x) + part2(x);
DGM
DGM 2021년 10월 19일
It might be worth asking if you intend to do this numerically or symbolically.
symbolically
Rik
Rik 2021년 10월 19일
Then start by declaring your variables as symbolic variables and start typing. You can still use my suggestion to minimize the risk of typos.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

질문:

2021년 10월 19일

댓글:

Rik
2021년 10월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by