How to call a function I wrote that extracts a ton of variables from different CSV files?

I collect data with a vehicle, the data collected is contained within 75 csv files, each of which has dozens to hundreds of columns. I wrote a function that will open each of them up and extract the rows of data I want to work with. Each csv file records a slightly different time and is recorded in unix time so the same function also converts each time unit to hours. Its like 600 lines long. I named the function allvaribles
Each time I run my vehicle I will likely want to plot something different, meaning I need different varibles each time, my idea is to extract all the import ones so I just them avaiable incase I need them. When I run the function I get all the datasets I want with no errors. When I create a test script and call the function allvariables(), the code runs without issue but none of my variables are in my workspace. How do I properly call this code so the variables are usable in a different script? Thanks!

回答 (1 件)

Walter Roberson
Walter Roberson 2025 年 5 月 6 日
移動済み: Voss 2025 年 5 月 7 日

0 投票

Assign the variables as output variables inside the script; assign the output variables appropriately when you call the function.

カテゴリ

ヘルプ センター および File Exchange で Variables についてさらに検索

製品

リリース

R2024b

タグ

質問済み:

2025 年 5 月 6 日

移動済み:

2025 年 5 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by