error saying not enough input arguments?
function newmatrix = rootflow(conversion)
a = [-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0; 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 .6 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 .253 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 .147 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 .16 0 0 -1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 .84 0 0 0 0 0 -1 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 ; 0 0 0 0 0 0 0 0 0 0 0 0 .09 0 0 -1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 .94 0 0 -1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 .91 0 0 0 0 0 -1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0 0 0 0 0 -1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1];
b = zeros(21,1);
b(1,1) = -1360.777;
a5 = a; %new variable for a so old one isn’t altered
newmatrix = zeros(1001,1); %creates matrix that I will add the values from the for loop
rowcounter = 1; %counts rows
for i = (conversion) %will go through all the conversion values
a5(7,4) = 1-i; %changes the values that are affected by the conversion
a5(8,4) = i*0.631;
a5(9,4) = i*0.368;
x5 = a5b; %new solution matrix for each conversion value
total_recycle_flowrate_5 = 2.20462*(x5(19) + x5(20));%new recycle flowrate for each conversion value
newmatrix(rowcounter) = total_recycle_flowrate_5;%the new recycle flowrate is added to newmatrix
rowcounter = rowcounter + 1; %rowcounter moves to next row so recylce flowrate will be added to next row
end
rootflow(0:.001:1)
>> rootflow
Not enough input arguments.
Error in rootflow (line 8)
for i = (conversion) %will go through all the conversion valuesfunction newmatrix = rootflow(conversion)
a = [-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0; 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 .6 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 .253 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 .147 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 .16 0 0 -1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 .84 0 0 0 0 0 -1 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 ; 0 0 0 0 0 0 0 0 0 0 0 0 .09 0 0 -1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 .94 0 0 -1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 .91 0 0 0 0 0 -1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0 0 0 0 0 -1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1];
b = zeros(21,1);
b(1,1) = -1360.777;
a5 = a; %new variable for a so old one isn’t altered
newmatrix = zeros(1001,1); %creates matrix that I will add the values from the for loop
rowcounter = 1; %counts rows
for i = (conversion) %will go through all the conversion values
a5(7,4) = 1-i; %changes the values that are affected by the conversion
a5(8,4) = i*0.631;
a5(9,4) = i*0.368;
x5 = a5b; %new solution matrix for each conversion value
total_recycle_flowrate_5 = 2.20462*(x5(19) + x5(20));%new recycle flowrate for each conversion value
newmatrix(rowcounter) = total_recycle_flowrate_5;%the new recycle flowrate is added to newmatrix
rowcounter = rowcounter + 1; %rowcounter moves to next row so recylce flowrate will be added to next row
end
rootflow(0:.001:1)
>> rootflow
Not enough input arguments.
Error in rootflow (line 8)
for i = (conversion) %will go through all the conversion values function newmatrix = rootflow(conversion)
a = [-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0; 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 .6 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 .253 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 .147 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 .16 0 0 -1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 .84 0 0 0 0 0 -1 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 ; 0 0 0 0 0 0 0 0 0 0 0 0 .09 0 0 -1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 .94 0 0 -1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 .91 0 0 0 0 0 -1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0 0 0 0 0 -1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1];
b = zeros(21,1);
b(1,1) = -1360.777;
a5 = a; %new variable for a so old one isn’t altered
newmatrix = zeros(1001,1); %creates matrix that I will add the values from the for loop
rowcounter = 1; %counts rows
for i = (conversion) %will go through all the conversion values
a5(7,4) = 1-i; %changes the values that are affected by the conversion
a5(8,4) = i*0.631;
a5(9,4) = i*0.368;
x5 = a5b; %new solution matrix for each conversion value
total_recycle_flowrate_5 = 2.20462*(x5(19) + x5(20));%new recycle flowrate for each conversion value
newmatrix(rowcounter) = total_recycle_flowrate_5;%the new recycle flowrate is added to newmatrix
rowcounter = rowcounter + 1; %rowcounter moves to next row so recylce flowrate will be added to next row
end
rootflow(0:.001:1)
>> rootflow
Not enough input arguments.
Error in rootflow (line 8)
for i = (conversion) %will go through all the conversion values function inputs MATLAB Answers — New Questions