Hi folks,
I'm in the midst of analyzing a set of data and it involves plotting the distribution of a large number of ions.
I currently am using the hist function in Octave to do so, and it produces graphs along the following lines, give or take bin-size.
However, my supervisor does not like this "style" of graph; and wishes to for it to look like the following distribution (not the same data as above!):
I was wondering if there was a simple way to do this in Octave, whether its curve fitting to a series of points or something else. Basically, I am in desperate need of a "continuous distribution" graph.
Thanks in advance. Yours,
J
hmmm... i didn't use "matlab" for a long time but i'm sure that u can plot what your supervisor wants very easy... sorry i forgot the syntax for that, actually i'm not hundred percent sure, so i don't wont to mislead you... cool thing in matlab is "help" function, so u can see exactly how u can do that what you need
try that if you have matlab, it's very easy to manipulate with type of plot you need, to look very nice you don't have to type more than few lines of code
I beleive that Matlab has kernel density estimation in one of its tool-boxes. KDE is the only method I know for producing smooth estimates of a density from sample data (that and its a pretty cool method).
As usual the wikipedia KDE article is useful, even pointing to the Matlab function that will do the job.
CB
although i was more in to "simulik" with matlab i think that this is what u need
here is one m-file (that u need to make or u can write this directly in command window)
clear all
close all
clc
t=-5:0.01:5 ;
x=cos(10*pi*t)+sin(2*pi*t);
figure(1)
plot(t,x,'r')
axis([-5 5 -2.5 2.5])
title('x(t)=cos(10 \pi t )+sin (2 \pi t')
xlabel('t')
ylabel('x(t)')
grid on
or u can do in multicolor like this
clear all
close all
clc
t=-5:0.01:5 ;
x1=exp((0.2+j*pi)*t);
x2=exp((-0.2+j*pi)*t);
x3=exp((0+j*pi)*t);
figure(2)
plot(t,real(x1))
hold on
plot(t,imag(x1),'r')
hold on
plot(t,real(x2),'--m')
hold on
plot(t,real(x3),'--k')
axis([-5 5 -2.5 2.5])
title('x(t)=e^{(\sigma+j\omega) t}')
xlabel('t')
ylabel('y(t)')
grid on
maybe you should post what is the function that you need to plot, or what values you need , maybe i'll remember something else that should be more acceptable to you and your supervisor
this you should get if u type that codes above ... easy you can change type and thickness of lines
Edit:
P.S. or if you don't know function that describe what you need, we can always (if u know in specific time intervals values of that function) approximate (very good) how doe's it act between two points... and lot's of another things
ahh yes, thank you
that should do the trick i was going totally somewhere else with this, i understand that he has sample data and i assumed that discreet signal (sequence signal) and like you do reconstruction from that signal to analog signal .... we can do this (it can be done like that because that samples in some time intervals are like "discreet signal" and using "butterworth" filter let's say 5th order can be approximated very very good )
something like this (just reconstruction )
[b a]=butter(5, 0.01);
ynfn=filter(b,a,xsh);
but that what you wrote there is more appropriate for that issue that OP have
I'm sorry for misleading