Ending this script at specific value
Show older comments
How can I make this script stop at a specific value for fl,fw,fh usw.?
t = 20 % temperature in C°
c = 331+(0.6.* t); % speed of sound (m/s)
w = 2.20;
l = 3.50;
h = 3.02;
% AXIAL MODES
m = 1:4;
fl = c/2 .* m/l;
fw = c/2 .* m/w;
fh = c/2 .* m/h;
% Tangential modes
ml = 1:4;
mw = 1:4;
mh = 1:4;
flw = c/2 * sqrt(bsxfun(@plus, (ml.'/l).^2, (mw/w).^2));
fwh = c/2 * sqrt(bsxfun(@plus, (mw.'/w).^2, (mh/h).^2));
flh = c/2 * sqrt(bsxfun(@plus, (ml.'/l).^2, (mh/h).^2));
% Oblique Modes
flwh = c/2 * sqrt(bsxfun(@plus,(flw(1:2,1:2) * 2/c).^2, permute(mh(1:2)/h,[3 1 2]).^2));
I already tried those:
if fl,fw,fh,flw,fwh,flh > 170
return
end
limit = 170;
if any(fl,fw,fh,flw,fwh,flh > limit)
return
end
thank you for your support. And I am sorry if it is a stupid question. Best regards and a nice evening.
Maurice
Accepted Answer
More Answers (0)
Categories
Find more on Audio I/O and Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!