Creating a table based on imputing arrays for the two variables in an equation.

1 view (last 30 days)
I have an equation:
Twc=35.74+0.6125*(T)-(35.75*(v)^0.61)+(0.4275*(v)^0.61)
This represents temperature (T) vs. wind speed (v) to get wind chill temperature. I am being asked to create a table 6x9 representing the Twc by imputing the values of temperature [40:10:-40] against speed [10:10:60] to get a unique value for each element such that (1,1) would equal Twc where T=40 and v=10.
I would normally prefer to figure this out on my own but I have spent 3+ hours on it, none of my classmates can figure it out and our professor (useless) won't give us a example of how to do this type of problem, so we have nothing to go by. I have attempted to google search for an example problem but nothing conducive has come up.
Our current chapter deals with input and fprintf function, as well as other formatting commands. If anyone has any advice on how to approach this, or tips it would be greatly appreciated.
Thanks!
  1 Comment
Star Strider
Star Strider on 28 Feb 2014
Before you and your classmates freak out at the results it produces, note that the equation you posted is wrong. See the Wikipedia article on Wind Chill for details.
I worked and graphed this one for fun. That’s when I noticed the problem.

Sign in to comment.

Answers (1)

A Jenkins
A Jenkins on 28 Feb 2014
Edited: A Jenkins on 28 Feb 2014
Respecting your wishes to "figure this out on my own", I won't directly post the code but looking at "meshgrid" should get you started.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!