How can I restrict a parameter (turbulence intensity) to only positive values?
Ältere Kommentare anzeigen
Hello,
I have a code in which the parameter u3 which denotes the turbulence intensity oscillates from positive to negative for each iteration. Since negative turbulence does not have any physical meaning, I hence want to restrict the same to only positive values. I'm finding it difficult to restrict the same in the code.
Can someone guide me please for the above-mentioned.
Please run using the callme.m file.
With regards,
rc
1 Kommentar
Torsten
am 8 Mai 2023
u3 = max(eps,u3)
?
Akzeptierte Antwort
Weitere Antworten (1)
E. Cheynet
am 9 Mai 2023
0 Stimmen
Rather than restricting the turbulence intensities to positive values only, I suggest to understand why the turbulence intensity is sometimes negative. Per definition, it should not happen. So there may be something wrong in the code.
2 Kommentare
Rahul
am 9 Mai 2023
E. Cheynet
am 26 Feb. 2024
The error comes likely from the function that calculate the turbulence intensity.
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!