public
anonymous / Pa5.m
Created

  • Download Gist
Pa5.m
Matlab
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
 
clc
clear
 
t = 35; %Hours until Landing
e_max = 25; %Energy
v_max = 60; %Voltage of Fuel Cells
cc = .12; %Navigation Power Factor
rc = 18; %Navigation Resistance
cl = [.005 .01 .015 ]; %Light Power Factor
rl = [1 2 3]; %Light Resistance
ch = [.1 .2 .3 .4]; %Capsule Heat Power Factor
rh = [12 24 36 48]; %Capsule Heat Resistance
ca = [.05 .1]; %Auxiliary Power Factor
ra = [.6 .12]; %Auxiliary Resistance
 
 
for count4 = 1:1:4;
for count3 = 1:1:3;
for count2 = 1:1:2;
x = count4;
y = count3;
z = count2;
test = fzero('Pa5_1eqn1',3);
end
end
end
Pa5_1eqn1.m
Matlab
1 2 3 4 5 6 7 8 9
function iavail = Pa5_1eqn1(ia)
%PA5_1EQN1 Summary of this function goes here
% Detailed explanation goes here
 
global cl ch cc ca t x y z;
 
iavail = ((t * ( cl(y)*ia^3 + ch(x)*ia^2 + cc*ia^2 + ca(z)))/25) - 1;
 
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.