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 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by