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

조회 수: 10 (최근 30일)
Jack
Jack 2014년 2월 28일
댓글: Star Strider 2014년 2월 28일
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
Star Strider
Star Strider 2014년 2월 28일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

A Jenkins
A Jenkins 2014년 2월 28일
편집: A Jenkins 2014년 2월 28일
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.

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by