can anyone help me solve these two questions please?

1 回表示 (過去 30 日間)
rsn
rsn 2020 年 11 月 6 日
コメント済み: John D'Errico 2020 年 11 月 7 日
1.Write a MATLAB program to find the value of f(x) is -2x when x < 0; x(x-2) when x is in [0, 2] and log(x-1) otherwise.
2. write a MATLAB program to find out the sum of the first 10 numbers in fribonacci series.
TIA

回答 (2 件)

Sibi
Sibi 2020 年 11 月 6 日
編集済み: madhan ravi 2020 年 11 月 6 日
1)
F=(x<0)*(-2*x)+(x<=2)*(x>=0)*(x*(x-2))+(x>2)*(log(x-1));
2)
Y=sum(fibonacci(1:10));
  8 件のコメント
rsn
rsn 2020 年 11 月 7 日
It's not like I don't have any ineterest in learning. I have my own reason for asking these questions. Thank you for answering my questions.
And to those who got butthurted just because someone answered my questions, I am sorry.
John D'Errico
John D'Errico 2020 年 11 月 7 日
@rsn - If you want help here, then you need to show some effort. Otherwise, you have shown no more interest than someone who wants nothing more than to get their homework answered.

サインインしてコメントする。


madhan ravi
madhan ravi 2020 年 11 月 6 日
help fibonacci
FIBONACCI Symbolic Fibonacci numbers. F = FIBONACCI(N) returns the N-th Fibonacci number. If N is a nonnegative integer then FIBONACCI(N) returns the N-th Fibonacci number. FIBONACCI(N) returns an error if the argument evaluates to a number of wrong type. FIBONACCI(N) returns the unevaluated function call if N does not evaluate to a number. Documentation for fibonacci doc fibonacci Other functions named fibonacci sym/fibonacci

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by