フィルターのクリア

How to access output variables from a m.file in another?

41 ビュー (過去 30 日間)
Ana Gabriela Guedes
Ana Gabriela Guedes 2021 年 4 月 15 日
回答済み: Cris LaPierre 2021 年 4 月 15 日
I have a m.file (ECG_Final.m) that asks for a data m.file and analyses it using a lot of functions defined in the same folder (but in different files, for example WaveSet.m, QRS_Complex.m, etc) and gives multiple output variables from this.
But I want to use this outputs in another m.file so i can analyse the data more deeply (if I want to use the values in variable P_offset, for example). How can I do this?

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 4 月 15 日
If the variables exist in your workspace, you can use them in any script.
Consider having one script that organizes your data processing workflow. You can create other scripts for particular tasks, and then call them using their file name in your main script. You could do something similar using functions, which allows you to just capture the specific variables you want to keep rather than all of them.
You can learn about scripts and functions here.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAdding custom doc についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by