![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1407774/image.png)
How to make this plot?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Develop a program that displays an isotherms profile of hydrogen gas (PV diagram)
at a range of temperature of 30 to 90 °C for 20 °C interval and at a range of pressure
between 1 – 50 bar. The profile must be completed with title, axis labels, and legend.
Make sure to differentiate the series with different markers and different line types only,
the colour of the lines and markers must be black. Assume that the gas behaves as an
Ideal Gas Law and the program should request the user to input the amount of
substance of the hydrogen.
1 Kommentar
Star Strider
am 10 Jun. 2023
Beyond that, solve this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1407774/image.png)
for one of them as a function of the other, and plot the result.
Antworten (1)
Samya
am 10 Jun. 2023
Bearbeitet: Samya
am 12 Jun. 2023
- Input the amount of substance of hydrogen gas (n)
- Define temperature range from 30 to 90 °C with 20 °C interval and pressure range from 1 to 50 bar
- Create a grid for temperature and pressure
- Calculate the volume of hydrogen gas using the Ideal Gas Law formula
% Creating a grid for temperature and pressure
[T, P] = meshgrid(T_range, P_range);
% Calculating the volume of hydrogen gas using Ideal Gas Law
V = (n * 8.314 * (T + 273.15)) ./ (P * 1e5);
5. Plot the isotherm profiles using the temperature and pressure as x and y-axis respectively and volume as a function
6. For each temperature values,
a) Set the marker to 'o', Line style to '-', and lineWidth to 2
b) Plot the isotherm profile, volume (y-axis) vs pressure (x-axis)
7. Add title, axis labels, legend and customize axes display,
a) Title - 'Isotherm Profile of Hydrogen Gas (30 to 90°C)'
b) X-Label - 'Volume (m^3)'
c) Y-Label - 'Pressure (bar)'
d) Legend - Show each temperature with a marker and line style used for the respective isotherm
e) Customize Axes display:
i) Set box on
ii) Set grid on
iii) Set plot background to white
iv) Set axis tick label font size and display precision
v) Set limit for x and y-axis based on the highest and lowest value of volume and pressure, respectively
Hope this helps! For any further clarifications do comment!
1 Kommentar
Dyuman Joshi
am 11 Jun. 2023
We do not recommended fully solving Homework assignments on MATLAB Answers. If you want to help, give hints (e.g mentioning which functions can be of use or linking some similar question that has been answered before) or provide a pseudocode.
Siehe auch
Kategorien
Mehr zu Volume Visualization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!