How do I get my script to produce a 2-D array?
1 次查看(过去 30 天)
显示 更早的评论
The script should display a 2-dimensional array with n-rows and two columns: The first column should display the years from 0 to n. The second column should display the account balance at the end of each corresponding year.
0 个评论
采纳的回答
Rick Rosson
2015-2-3
n = 30;
X = zeros(n+1,2);
X(:,1) = 0:n;
X(:,2) = ...
disp(X);
2 个评论
Rick Rosson
2015-2-3
编辑:Rick Rosson
2015-2-3
dur = input('the investment duration in years:');
time = 0:dur;
account_balance=initial_bal.*(1+rate).^time;
result = [ time account_balance ];
disp(result);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 3-D Scene Control 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!