Info

此问题已关闭。 请重新打开它进行编辑或回答。

In regards to connecting points

1 次查看(过去 30 天)
Harold
Harold 2011-3-3
关闭: MATLAB Answer Bot 2021-8-20
After discussing the project more with my professor, I have learned that I did this wrong. What I was suppose to do was this:
Calculate the Mach number at each of the three altitudes for mdotfuel=.1, .2, .3, .4, .5, .6, .7 Note: In this code I change mdotfuel to mdotf The flight Mach number is M_0.
In case you forgot what I'm plotting it is 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 again, I'm stuck at plotting out the three plots. I've tried using your code that you supplied to me on the first question but for some reason it doesn't work when I attempt to implement it in this new code. I thought I knew how your code worked but I was wrong when I tried to make adjustments. Could you explain to me how this works.
Note: The updated code now grabs data from an excel sheet because if I happen to make a change in the excel sheet, I won't have to change all the values that I'm using. You won't have to do anything with the Excel file. You can download zip file with the .m file and excel sheet at the link below. Thanks again for all the help you've given. I would really like to learn the 3 dimensional matrix tool.
Harold
  2 个评论
Walter Roberson
Walter Roberson 2011-3-3
The reference to "you" appears to be to Matt's solution in http://www.mathworks.com/matlabcentral/answers/2118-connecting-points-in-a-scatter-plot
Harold
Harold 2011-3-3
Could you explain what you mean?

回答(1 个)

Walter Roberson
Walter Roberson 2011-3-3
Your code does not contain any plot attempts, not even commented out. Please indicate what you want to plot against what.
You calculate a number of values within the double-nested loop, but you do not save any of the values in to an array. When you think of plotting, you should almost always be saving values in to an array to plot a line at a time (or to plot everything at the end.)
  1 个评论
Harold
Harold 2011-3-3
The reason why I don't have any plot attempts is because I deleted the code for it because it did not work. The code that I had was the following:
plot(M_0,Thrust)
hold on
How would I go about saving the arrays? According to the loop, I have 24 arrays...8 loops for mdotf X 3 loops of alt. I'm not entirely sure on were the saving should be put within the code.

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by