Going to go crazy. I noob in matlab. Please help me in those problem. Q : Write MatLab solution for the function DF that asks for a teamperature(in degree fahrenheit) and computes the equivalent temperature in degrees Celcius, and another function DC that asks for a temperature(in degrees Celcius) and computes the equivalent teamperature in degree Fahrenheit. Your functions should be able to accept both scalar and matrix input. The script should keep running until o number is provided to convert. [The function isempty will be useful here.] (Hint : Fahrenheit to Celsius : (F-32)*5/9 Celsius to Fahrenheit : (C*9/5 + 32)) Q : Create a vector x with elements, Xn = (-1)^n+1 / (2n-1) Add up the elements of the version of this vector that has 100 elements. Q : Create the vector x = randperm(35) and then evalute the following function using oly logical indexing : y(x) = 2 if x < 6 = x - 4 if 6 <= x < 20 = 36 - x if 20 <= x <= 35 Really hope someone is kind enough to help me slove the prob. :(

0 |

8/29/2010 4:11:26 AM

kyamato <jayzoner@gmail.com> wrote in message <1737293872.109429.1283069516649.JavaMail.root@gallium.mathforum.org>... > Going to go crazy. I noob in matlab. Please help me in those problem. > > Q : > > Write MatLab solution for the function DF that asks for a teamperature(in degree fahrenheit) and computes the equivalent temperature in degrees Celcius, and another function DC that asks for a temperature(in degrees Celcius) and computes the equivalent teamperature in degree Fahrenheit. Your functions should be able to accept both scalar and matrix input. > > The script should keep running until o number is provided to convert. > > [The function isempty will be useful here.] > > (Hint : Fahrenheit to Celsius : (F-32)*5/9 > Celsius to Fahrenheit : (C*9/5 + 32)) > > > Q : > > Create a vector x with elements, > > Xn = (-1)^n+1 / (2n-1) > > Add up the elements of the version of this vector that has 100 elements. > > > > Q : > > Create the vector x = randperm(35) and then evalute the following function using oly logical indexing : > > y(x) = 2 if x < 6 > = x - 4 if 6 <= x < 20 > = 36 - x if 20 <= x <= 35 > > > > > Really hope someone is kind enough to help me slove the prob. :( Hi This group does not generally operate as a homework service, but we are happy to help with Matlab questions. To get help here, you could write some code, try it out, try to fix the problems you run into, and then ask questions here if you get stuck. Have you read "Getting Started"? http://www.mathworks.com/access/helpdesk/help/techdoc/learn_matlab/bqr_2pl.html For your homework, you will use material from Matrices and Arrays, and Programming. Ross

0 |

8/29/2010 10:53:03 AM