Code organziation during exploratory data analysis?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I'm interested in how you organize your code for exploratory/preliminary work with complex datasets. Imagine a case where you have some data in the workspace and want to manipulate and plot parts of it, but there's no clear workflow yet -- you're making up your analysis strategy as you go.
For this kind of work, I typically use scripts. I load my raw data into the workspace and then manipulate and plot it using scripts with many sections.
I like how flexible and self-contained scripts are, but it gets complicated when I want to re-use short blocks of code, e.g. for analyzing several variants of my data in parallel. To re-use code, I see two options: anonymous functions and m-file functions. What I'm missing is something in between, namely nested functions within scripts. Often, the code blocks that I want to re-use are too complex to be converted to an anonymous function. But I might have dozens of them in the same script, and I don't want to maintain a mess of function files that are quickly getting out-dated and are more cumbersome to edit than code that's directly within the script file.
So how do you handle this situation?
- Do you copy/paste code and edit it manually?
- Do you create many little function files?
- Am I wrong using scripts in the first place?
- How does MathWorks envision work like this to be done?
Thanks, Matthias
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Low-Level File I/O에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!