clc;
clear;


% Define constants
c = 8;   
h = 18;  
o = 0;   
airs = 12.5;  

% Define input ranges (same as original)
temp = (100:25:3000)';  % 49 temperature values
press = (20:5:120)';  % 21 pressure values
feq = (0.8:0.02:1.3)';  % 26 equivalence ratio values

% Initialize output array for n5nt values
n5nt = zeros(49, 21, 26);

% Start timing
tic;

% Loop over all values (same as original structure)
for i = 1:49
    for j = 1:21
        for b = 1:26
            [n5nt(i, j, b), ~] = mydissfuniii_newton(c, h, o, temp(i,1), feq(b,1), airs, press(j,1));
        end
    end
end

% Stop timing
time_elapsed = toc;

% Display computation time
fprintf('Total Computation Time: %10.6f seconds\n', time_elapsed);
fprintf('%.5f\n', n5nt(:,1,1)); % Display n5nt for first equivalence ratio
