Connecting plot points from nested loops

Click For Summary
SUMMARY

The discussion focuses on using MATLAB to plot Thrust versus Mach number (M_0) for varying mass flow rates (mdotf) at three different altitudes. The user is leveraging data from an Excel sheet to maintain flexibility in their calculations. They encountered difficulties in generating the plots but successfully resolved their issue with assistance from forum members. The conversation emphasizes the integration of MATLAB with Excel for data-driven plotting.

PREREQUISITES
  • Familiarity with MATLAB programming and plotting functions
  • Understanding of Mach number calculations in aerospace contexts
  • Experience with data manipulation in Excel
  • Knowledge of nested loops in programming
NEXT STEPS
  • Explore MATLAB's plotting functions for advanced visualization techniques
  • Learn how to automate data import from Excel into MATLAB
  • Investigate the use of nested loops for complex data processing in MATLAB
  • Study the impact of varying mdotf on thrust performance in aerospace applications
USEFUL FOR

Aerospace engineers, MATLAB users, data analysts, and anyone involved in performance analysis and visualization of flight dynamics.

roldy
Messages
206
Reaction score
2
Here's small part of a project I'm working on. The code is not part of the grade. I'm just doing this for my own benefit and I figured that MATLAB can do the plotting automatically for me.

Calculate the Mach number at each of the three altitudes for mdotf=.1, .2, .3, .4, .5, .6, .7 The flight Mach number is M_0.

I'm plotting Thrust vs. M_0 for 7 different mdotf values. I need to do this at 3 different altitudes.

I wrote the code to do just this. But I'm stuck at plotting out the three plots.

The code grabs data from an excel sheet to use in calculating M_0. I wanted to have flexibility with the data; in case I needed make a change in the excel sheet, I won't have to change all the values that I'm using in MATLAB. You won't have to do anything with the Excel file. Attached is the .m file and the Excel sheet in a zip file. They have to be in the same folder of course in order to work.
 

Attachments

Physics news on Phys.org
Rather than posting the .zip file, why not just post the MATLAB code in between the [CODE ][/CODE ] tags? A little more description of the data file (format / structure) would also assist us in helping you debug this.
 
I figured out my problem. Thanks for the reply.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K