I need to make two plots of volume as a function of time vs pressure as a function of time. When plotted the graph will have an enclosed area. I am having trouble on how to have matlab plot these two functions against each other.(adsbygoogle = window.adsbygoogle || []).push({});

My experience with matlab is having a function defined in a script file. I have not been exposed to using a function m file to define a function and reference it in a script.

My functions are as follows where (t) is the only variable, everything else is defined earlier in the file. I need to graph P vs Vc and P vs Ve. The order of magnitudes of Vc and Ve is different by 10^-3 hopefully that won't matter.

Vc =@(t) vc*sin(omega*t);

Ve =@(t) ve*cos(omega*t);

A =@(t) Vc(t)/(R*Tc) + vtl/(R*Ttl) + vr/(R*Tr) + Ve(t)/(R*Te);

P =@(t) M/A(t);

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# [Matlab] Plotting two functions of the same variable against each other

Loading...

Similar Threads - Matlab Plotting functions | Date |
---|---|

Matlab Plotting a 3d function | Apr 1, 2016 |

Plotting an integral-defined function in MATLAB | Aug 5, 2015 |

Matlab: what is the right 3D plotting function for my code? | Apr 22, 2013 |

[Matlab] Plotting a function inside a m-file? | Oct 9, 2012 |

Plotting Bode Diagrams of exponential functions in MatLab(with unknows and a complex) | Mar 31, 2012 |

**Physics Forums - The Fusion of Science and Community**