supersonic nozzle design code error
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm currently using the following code to try and determine nozzle designs; https://www.mathworks.com/help/aerotbx/ug/solving-for-the-exit-flow-of-a-supersonic-nozzle.html . Whenever I run the provided code from MatLab I get the following error;
'plotExpansionSchematic' is used in Solving for the Exit Flow of a Supersonic Nozzle.
Error in project413fluidflow (line 4)
upperNozzle = plotExpansionSchematic('uppernozzle');
I've tried looking through the .m file that is provided that uses the plotExpansionSchematic function but I honestly don't know what I'm looking for to fix this error and get the code working and plots to show up, I haven't chnaged anything about the code except the initial conditions whihc I am using the following conditions; exitMach=1.25, exitPres=421.512, and backPres=154.2166. Any help in resolving this error would be greatly appreciated. I will also note that when I run the code that defines plotExpansionSchematic I also get an error, in case that is part of the issue I'm having the error is:
>> plotExpansionSchematic
Not enough input arguments.
Error in plotExpansionSchematic (line 182)
switch lower(type)
1 Commento
Kautuk Raj
il 20 Mag 2024
I tried running the mentioned example using the modified parameters in MATLAB R2023b but could not reproduce the error you are facing.
Risposte (1)
Animesh
il 19 Giu 2024
Hi Nate,
This error comes up when you do not have the function "plotExpansionSchematic" in the MATLAB search path.
You can either copy the function file to your current working directory or add the path to this function to your MATLAB path from the hyperlink mentioned in the error statement itself. Attaching a screenshot for your reference:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1718456/image.png)
After clicking the unlined hyperlink shown above, it will take to the directory having the function plotExpansionSchematic.m file:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1718461/image.png)
Once you have this file in MATLAB path, you will no longer see this error.
I hope this helps!
Animesh
0 Commenti
Vedere anche
Categorie
Scopri di più su Get Started with Aerospace Blockset in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!