Write a fucntion file (name it Hello) fro the fucntion f(x) = x4 √(3x+5)/(x2+1)2.
The input to the fucntion is x and the output is f(x). Write the fucntion such that x can be a vector. Use the
fucntion to calculate.
a. f(x) for x=6.
b. f(x) for x=1,3 5,7,9 and 11
how i can write this ?
what i do is this

댓글 수: 2

Muhammad Akmal Rafique
Muhammad Akmal Rafique 2020년 5월 14일
f=@(x) x.*4.*sqrt(3.*x+5)/(x.*2+1)^2;
x1=[6]
x=[1;3;5;7;9;11];
f(x)
f(x1)
darova
darova 2020년 5월 14일
Everything is ok except the dot (element wise operator)

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

답변 (0개)

카테고리

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

질문:

2020년 5월 14일

댓글:

2020년 5월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by