How to Import Data from another MATLAB file?

92 ビュー (過去 30 日間)
Tom
Tom 2019 年 7 月 28 日
コメント済み: Star Strider 2019 年 7 月 28 日
I have a MATLAB file which creates a 400x1 array when I run it, I would basically like to copy the data from that array over into a new MATLAB file, so when I start the new file I would like to load that vector into the new file so that I can use it in equations. What would be the easiest way of doing this?

採用された回答

Star Strider
Star Strider 2019 年 7 月 28 日
I would save it as a .mat file in the first .m file, then load it into the new .m file.
  2 件のコメント
Tom
Tom 2019 年 7 月 28 日
編集済み: Tom 2019 年 7 月 28 日
The vector is called F, I tried save F.mat to then load it in the new .m file, but it seems to save everything in the workspace created by the first file, rather than just saving that one vector alone.
Edit: Not to worry, I've done it now.
Star Strider
Star Strider 2019 年 7 月 28 日
Great!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by