-1

I have a meshgrid mask array that has the temperature distribution along the geometry (x,y,t). I need to make a graph of the temperature change along, let's say, y = 10.

How would I go about doing this?

Justin Maller
  • 59
  • 1
  • 3

1 Answers1

0

I am not sure why you represent your data in 3D meshgrid while you work on 2D meshgrid, assuming t in (x, y, t) stands for temperature. If you create a 2D meshgrid and calculate t, then it is easy to plot it, e.g:

 x = 1:20;
 y = 1:20;
 [X, Y] = meshgrid(x, y);
 t = X.^2 + Y.^2; % Add your t equation here using your meshgrid X and Y
 figure;plot(x, t(10,x));
ChrisB
  • 498
  • 3
  • 10
  • Thanks for your response and you're right t is temperature, apologies. This has brought me a step closer, however it's just a straight line, it doesn't mimic the temperature distribution that I can see visually in my mask array i.e. the temperature goes up from 40 C to 52 C along y = 10mm, this isn't represented in the graph - do you know why? – Justin Maller Aug 30 '17 at 02:13
  • I edit the code a bit, you can check again. Sorry, I cannot help if you do not show sample code and sample outputs etc. It is just a 'geusswork' now – ChrisB Aug 30 '17 at 02:41