how i can write a MATLAB function with three inputs
10 ビュー (過去 30 日間)
古いコメントを表示
i need help on this
INTEREST = money*.025
display the total INTEREST
test your program for three inputs : 400 800 1200
the output =
totalINTEREST = 60
how can i find the total INTEREST of an numbers of accounts ?
0 件のコメント
回答 (1 件)
Ameer Hamza
2020 年 11 月 13 日
Given a vector
x = [400 800 1200]
You can multiply it with the interest factor to get individual interests
x_interest = x*0.025;
and calculate total interest
interest_total = sum(x_interest)
2 件のコメント
Ameer Hamza
2020 年 11 月 13 日
Yes, you can just write these lines in a function. Since this is a homework problem, so I cannot give an exact answer but here is a useful link
参考
カテゴリ
Help Center および File Exchange で Install Products についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!