
#1
Feb2311, 04:58 AM

P: 2

Calculating area under graph from results of a for loop
Im currently designing a shock absorber for an aircraft undercarriage, i have input all the relevant information and formulas into Matlab and created an M file with a functioning for loop giving a graph. The problem i'm having now is that in order to work out the area under the graph that i get from the file i need a line of best fit, which cannot be plotted in matlab on a for loop with the use of hold on and hold off. The code i wrote is at the bottom of this post Is it possible to either put the results of the for loop into a vector to plot or failing that another way to get matlab to calculate the area under each graph. The code i have created is below:



Register to reply 
Related Discussions  
What are the different materials used in a spring shock absorber?  Engineering Systems & Design  2  
Shock absorber  Electrical Engineering  3  
3 spring shock absorber help  Advanced Physics Homework  0  
Shock absorber  Brain Teasers  18 