| Forum |
|
|||||||
| Software Q&A Having trouble with software? Find solutions here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
I am Optimus Prime
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
|
Code:
function [captial,interest] = compound(capital,years,rate,timescomp);
% COMPOUND: function to compute the compounded capital and the interest
% call syntax:
% [capital,interest] = compound(capital,years,rate,timescomp);
% ------------
x0 = capital; n = years; r = rate; k = timescomp;
if r>1
disp('check your interest rate. For 8% enter .08 not 8.')
end
capital = x0*(1+r/k)^(k*n);
interest = capital - x0;
Code:
>> [c,in]=compound(1000,5,0.06,4); [color=red]??? One or more output arguments not assigned during call to 'compound'.[/color] |
|
|
| Advertisements. Register and be a member of the community to get rid of them. | |
|
Advertisement
|
|
|
|
#5 (permalink) |
|
I am Optimus Prime
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
|
Matlab is used for doing complex mathematical calculation. More about matlab at www.matlab.com or www.mathworks.com
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|