フィルターのクリア

II. Plotting the Conversion

1 回表示 (過去 30 日間)
Filiz Demian
Filiz Demian 2020 年 10 月 26 日
コメント済み: Filiz Demian 2020 年 10 月 29 日
  1. Ask the user their name and store in a variable
  2. Ask user to enter 10 values as an array and store in a variable (bookend with square brackets)
  3. Convert the entire array to Celsius and store in a variable
  4. Plot the temperature conversion with labels and title
  5. Use black asterisks for the marker
  6. Copy and paste the plot below:
Please help! How do I do this?

回答 (1 件)

Rohit Pappu
Rohit Pappu 2020 年 10 月 29 日
% Prompt to ask the user to enter name
prompt = ' Enter name ';
name = input(prompt,'s');
% Prompt to ask the user to enter array values with square brackets
prompt = 'Enter array of values';
temperature = input(prompt);
% Temperature conversion
celsius = (temperature - 32)*(5/9);
% Plotting Fahrenheit on X axis and Celsius on Y axis
plot(temperature,celsius,"LineStyle","none","Color",'k',"Marker","*");
xlabel('Fahrenheit');
ylabel('Celsius');
title('Plotting Fahrenheit vs Celsius');
  1 件のコメント
Filiz Demian
Filiz Demian 2020 年 10 月 29 日
Thank you!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by