How store values in a column array?

At first this is my work:
addpath('file');
im = importdata('Results0.txt');
data = getfield(im, 'data'); %#ok<GFLD>
[areamax] = max(data);
areamax = areamax (2:4);
r = areamax (2)/areamax (3);
vol = (((areamax (1))^(3/2))*pi)/(((r)^(1/2))*4);
My import data is different files.txt with the name Results# from where the volume of the data is calculate. I change the name of the file every time, but I need to store all the volume in a column array to later make a plot. I don't known how save the volume before change the file, for example Results1 to Result2. Thank you for your time.

답변 (1개)

Walter Roberson
Walter Roberson 2013년 6월 27일
편집: Walter Roberson 2013년 6월 27일

0 개 추천

If you initialize
vol = [];
then you can append each new result to the column by using
vol = [vol; (((areamax (1))^(3/2))*pi)/(((r)^(1/2))*4) ];

카테고리

도움말 센터File Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기

질문:

2013년 6월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by