フィルターのクリア

How can I load data from Excel file to Matlab in script and use the data loaded to calculate?

3 ビュー (過去 30 日間)
Newbie
Newbie 2023 年 2 月 28 日
コメント済み: Newbie 2023 年 2 月 28 日
Hi guys, I am a newbie in Matlab and I am using Matlab for my thesis. I have an excel file contain data and I want to load these data into Matlab and therefore I can write programme to calculate using these data in Matlab. How can I do that? Can you show me the full code because I am so new to this. Thank you very much!

回答 (2 件)

David Hill
David Hill 2023 年 2 月 28 日
Use readmatrix or readtable. If you attach your spreadsheet we could help more.
  2 件のコメント
Newbie
Newbie 2023 年 2 月 28 日
My code
clc
syms t s Gs Gt Ks Es Et
E0 = [10490.3622];
v = 0.3;
Et = simplify(laplace(Et, t, s));
Ks = E0/(3*s*(1-2*v));
Gs = (9*Ks-Es)/(Es*Ks);
Gt = ilaplace(Gs,t);
writematrix([value_t(:),Gt(:)],'C:\Relaxation modulus\data.xlsx');

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


David Hill
David Hill 2023 年 2 月 28 日
MSU1=readmatrix('Relaxation data.xlsx','Range','A4:E82')%load the others following the same method
MSU1 = 79×5
1.0e+04 * 0 0 0 NaN 0 0.0000 0 0.0001 NaN NaN 0.0003 0.0000 0.0005 0.4870 0.1873 0.0005 0.0000 0.0008 0.8009 0.3080 0.0007 0.0000 0.0013 1.1517 0.4430 0.0009 0.0000 0.0016 0.6929 0.2665 0.0011 0.0000 0.0019 0.8668 0.3334 0.0013 0.0000 0.0023 1.0303 0.3963 0.0014 0.0000 0.0026 0.5757 0.2214 0.0016 0.0000 0.0029 0.8582 0.3301
  3 件のコメント
David Hill
David Hill 2023 年 2 月 28 日
use readtable instead and assign variable names.
Newbie
Newbie 2023 年 2 月 28 日
Thank you very much!!!!

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

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by