How can I model a temperature change using MATLAB?

  • Thread starter Thread starter BubblesAreUs
  • Start date Start date
  • Tags Tags
    Matlab Modelling
Click For Summary

Discussion Overview

The discussion revolves around modeling a temperature change using MATLAB, specifically focusing on the relationship defined by the equation k = Delta Q / t. Participants explore how to implement this model in MATLAB, including the behavior of variables and array indexing.

Discussion Character

  • Homework-related, Technical explanation, Debate/contested

Main Points Raised

  • One participant presents a method for modeling the equation by suggesting a loop for k and plotting a k vs t curve, expressing uncertainty about the approach.
  • Another participant questions whether Delta Q is a fixed constant or if it varies with k or t, indicating a need for clarification on the nature of Delta Q.
  • A subsequent post asserts that Delta Q is a fixed variable, while k and t are floating variables dependent on it.
  • There is a discussion about MATLAB's array indexing, with one participant stating that MATLAB arrays are not indexable in the same way as Python, while another counters that MATLAB arrays are indeed indexable but require different syntax.

Areas of Agreement / Disagreement

Participants express differing views on the nature of Delta Q and the indexing of arrays in MATLAB, indicating that there is no consensus on these points.

Contextual Notes

There are unresolved assumptions regarding the dependency of Delta Q on k or t, as well as the implications of MATLAB's array indexing on the proposed modeling approach.

BubblesAreUs
Messages
43
Reaction score
1

Homework Statement


Modelling the following equation:

k = Delta Q / t

Homework Equations



Q = T2 - T1 = -40 (fixed)

t = Delta Q / k. I need to find t.

k can be floating so I suppose 0 to 10 minutes with 0.5 increments

The Attempt at a Solution



I don't have MATLAB on me at the moment, but I think I should just set a loop for k, nest the expression for t and the plot a k vs t curve.

Does that sound right?
 
Physics news on Phys.org
Is the delta Q a fixed constant or does it depend on k or t?
 
jedishrfu said:
Is the delta Q a fixed constant or does it depend on k or t?
Delta Q is a fixed variable and rather k, t depend on it as they are floating variables.

MATLAB is a bit different from python in that its arrays aren't indexable. Say x = [1,2,3,4,5], I can't use x[0] = 1, x[3] = 4, etc.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
5K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
0
Views
2K