can anyone help me solve these two questions please?
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
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 个评论
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!