solving function from different formula

조회 수: 1 (최근 30일)
Nimbuzz Kurodo
Nimbuzz Kurodo 2021년 10월 5일
편집: Nimbuzz Kurodo 2021년 10월 5일
find x value from 3 different value of formula

채택된 답변

Walter Roberson
Walter Roberson 2021년 10월 5일
Example
part1 = @(x) (x < 2).*(4*sqrt(x) + 2)
part1 = function_handle with value:
@(x)(x<2).*(4*sqrt(x)+2)
part2 = @(x) (x >= 2 & x <= 5).*(3*x - 1)
part2 = function_handle with value:
@(x)(x>=2&x<=5).*(3*x-1)
part3 = @(x) (x > 5) .* 5./x;
y = @(x) part1(x) + part2(x) + part3(x);
fplot(y, [0 10])

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by