Prev: exportfig
Next: cross product between vector and array
From: Yoel Koenka on 7 Jul 2010 06:09 Hi all, I have about a 100 x-y data files, and I'd like to sum them up to one x-y graph. The thing is, the x values aren't necessarily exactly the same. Meaning, in one file it can be x=1.5 and in the other x=1.49. Is there a way to sum these graphs using bins of, let's say 0.1 width? Thanks a lot! Yoel
From: Steven Lord on 7 Jul 2010 09:59 "Yoel Koenka" <yoelk(a)tx.technion.ac.il> wrote in message news:i11jo0$los$1(a)fred.mathworks.com... > Hi all, > I have about a 100 x-y data files, and I'd like to sum them up to one x-y > graph. > The thing is, the x values aren't necessarily exactly the same. > Meaning, in one file it can be x=1.5 and in the other x=1.49. > Is there a way to sum these graphs using bins of, let's say 0.1 width? > Thanks a lot! > Yoel > If you just want to plot them, use HOLD ON or HOLD ALL, although an axes with 100 lines on it is going to look quite busy. Maybe creating some number of subplots (using SUBPLOT) or creating several figures to store the plots would be better. If you're looking to actually add up the data, interpolate the data (INTERP1) to the common x values at which you want to plot your data, and then add up the interpolated y values corresponding to the same x. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
Pages: 1 Prev: exportfig Next: cross product between vector and array |