how can i compare Pexit which is the output of outlet to Pback given. By approximating after checking for greater/less than conditions.Ive already wrote code but main function is that of nozzelcalculator that result Pexit

1 view (last 30 days)
for n=1:1:10 %%dont want it to have necessarly specific endingnumber
outlet=Pexit;
if
for n=1:1:10 %%dont want it to have necessarly specific endingnumber
% outlet is an output of function which takes inputs, one being As which is location we guess at first
% im given Aexit
% iF Pexit>Pback have to new location of As by taking midpoint of first guess and Aexit
% if Pexit<Pback have to take As by taking midpoint of third and second guess
% do this till we can approximate Pexit to Pback
outlet=Pexit;
if Pexit > Pback
As=An+Aexit/2;
elseif Pexit < Pback
As=As+As-1/2;
end
end
%im strugling to create this part comparing

Answers (0)

Community Treasure Hunt

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

Start Hunting!