필터 지우기
필터 지우기

How to make the code read excel file?

조회 수: 3 (최근 30일)
Ibrahim AlZoubi
Ibrahim AlZoubi 2020년 5월 16일
댓글: Star Strider 2020년 5월 16일
This is my code:
it calculate y when the user give the input value.
clear
clc
prompt = 'What is the temperature value (in C)? \n.\n.\n ';
temperature = input(prompt)
y = abs(0.5*(temperature /15)*1.225*0.8*3.14*5^2*((2*9.8*200*((abs(15-temperature))/temperature))^0.5)^3)
how can I make matlab code real excel file and the excel file has a values and I want to make each one of these values is the tempreture, and then export new file with given new values.

채택된 답변

Star Strider
Star Strider 2020년 5월 16일
Use the readmatrix function (or xlsread if you do not have readmatrix). There are also others, such as readtable, depending on what you want to do.
Do the calculations, then use the corresponding write functions (linked to in the pages I linked to here) to write the results.
  댓글 수: 7
Ibrahim AlZoubi
Ibrahim AlZoubi 2020년 5월 16일
great now how to write a code converts from a2t to excel file?
Star Strider
Star Strider 2020년 5월 16일
Use the writetable function.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by