- #1
akhanijow
- 7
- 0
Hi everyone,
I am writing a MATLAB program and am having some issues. Here is the code I have written so far:
For info(5), I am trying to make it say "what is the maintenance cost for year __?"
I have tried using num2str, and may other things but can't seem to get it! Any help would be great! Thanks!
I am writing a MATLAB program and am having some issues. Here is the code I have written so far:
Code:
clear all
clc
info(1) = input('What is the MARR (%)? ');
info(2) = input('What is the lifetime of the project? ');
info(3) = input('What is the initial investment ($)? ');
m=0;
while m < info(2)
m = m+1;
info(4) = m;
info(5) = input('What is the maintenance cost for year',num2str(m),' ? ');
end
functionanswer = Evaluation(info);
disp('The Present Value of the project is');
disp(functionanswer(1));
For info(5), I am trying to make it say "what is the maintenance cost for year __?"
I have tried using num2str, and may other things but can't seem to get it! Any help would be great! Thanks!