MATLAB Answers

How do you save and then plot multiple workspace variables onto one graph

조회 수: 4(최근 30일)
Grace Frost
Grace Frost 2021년 7월 27일
답변: Shadaab Siddiqie 2021년 7월 30일
I have some code that reads a text file created from a macro in ImageJ.
Background: I have an AVI of the flow iof water across a membrane. In ImageJ, i threshold the image and track the front of the flow in pixels (i.e. 255 and 0). Then a text file is create with frames against average pixel. Then matlab reads the text file and ocnverts the pixel into distance and the frames into time.
However, i have multiple AVI's that i need to process and plot the height of each onto one graph. I have been doing this manually by copying and pasting the data into one excel file so i can plot all my data sets onto one graph. However, excel keeps crashing because of the large amounts of data. Is there an easier way to do this in MATLAB without having to export data to an excel file. Maybe, saving the height as a workspace variable each time i run the code for each text file and then plot all the variables agaibnst eachother?
Thanks in advance,
Grace

답변(1개)

Shadaab Siddiqie
Shadaab Siddiqie 2021년 7월 30일
Form my understanding you want to plot graph from multiple workspace variable. You can use Simulink data inspector for visualizing large amount for data (even from workspace variables). When your workspace data is in a format that built-in readers do not support, you can write a custom data reader to import the data into the Simulation Data Inspector.

Community Treasure Hunt

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

Start Hunting!

Translated by