I'm trying to convert temperature in fahrenheit to kelvin how can I display the units of an input and output variable (kelvin and fahrenheit) value

16 views (last 30 days)
The input variable is in degree fahrenheit,the output variable is in degree kelvin

Answers (1)

Khushi Maheshwari
Khushi Maheshwari on 14 Sep 2021
Edited: Walter Roberson on 14 Sep 2021
clc;
temp_f=input('Enter Temprature in "F"');
temp_k= (5/9) * (temp_f - 32) + 273.15;
fprintf('Temprature in "K" is %f ',temp_k);
  3 Comments
Emir
Emir on 6 Apr 2023
I'm aware that your comment is also nearly 2 years old so, if you're not OK with this, I'm sorry. I think usage of those material is in user's (in this case, student's) responsibility. I'm a student as well and at contact with my teacher, he already gave us the building blocks and I wrote my code but I have problem with C to K convertion. I informed my teacher and since he has a pretty busy schedule due to having more that one role at university, I'm looking for other solutions to bugfix my code online. I couldn't find something usable for me here but if people do what you say in this comment, students which are responsible enough will be punished and irresponsible ones can just ask to one of their friends to do their homework.
Rik
Rik on 7 Apr 2023
I actually disagree. If you are a diligent student, you're free to post a question showing your code, asking for advice on how to fix it.
That is a completely separate issue from people posting complete solutions without explanation. The only thing you can do with such answers is copy it and pass it off as your own.
Feel free to post your question and @-mention me in a comment.
You can find guidelines for posting homework on this forum here. If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks).

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!