Info

This question is closed. Reopen it to edit or answer.

problem with solving Equation

1 view (last 30 days)
adele
adele on 1 Feb 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi, how can I solve this Equation '', when variable 'I' is used in loop previous lines. that means, I didn't take number 'I',but I have to use it in loop,How can I solve this problem?
.....................................................
% if true
% code
clc
clear all
syms I
data=xlsread('Data','database');
capacity=data(:,1);
Uf=data(:,2);
co_m=data(:,3);
CA=data(:,4);
Kdg=0.9;
Ro=0.1*CA;
Co=0;
Cf=49;
Cs=0;
n=5;
sum=0;
P=200000000;
for j=1:length(data)
Rm(j)=27.11*capacity(j)*Uf(j)*8760*Kdg;
Co_m(j)=capacity(j)*co_m(j)*8760*Kdg ;
Cfuel(j)=capacity(j)*Uf(j)*Cf*8760*Kdg;
ben(j)=Rm(j)-(Co_m(j)+Cfuel(j)+Cs);
end
for j=1:length(data)
sum=0;
for i=1:5
sum=((ben(j))/(1+I)^i)+sum==0;
end
sum
end
solve(-P+sum+(Ro-Co)*(1/(1+I)^n)==0,I)

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!