How do I get my script to produce a 2-D array?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nguyen
el 3 de Feb. de 2015
Editada: Rick Rosson
el 3 de Feb. de 2015
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 comentarios
Respuesta aceptada
Rick Rosson
el 3 de Feb. de 2015
n = 30;
X = zeros(n+1,2);
X(:,1) = 0:n;
X(:,2) = ...
disp(X);
2 comentarios
Rick Rosson
el 3 de Feb. de 2015
Editada: Rick Rosson
el 3 de Feb. de 2015
dur = input('the investment duration in years:');
time = 0:dur;
account_balance=initial_bal.*(1+rate).^time;
result = [ time account_balance ];
disp(result);
Más respuestas (0)
Ver también
Categorías
Más información sobre 3-D Scene Control en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!