Skip to main content

NONUNFORM SOUND WAVE GENERATOR


## a script for a sound wave source made up of two different masses ##seperated in the middle. Let the rigth part is lighter than the
##left one that ensures that the ligther is faster, and so has
##greater r since r=cdt/dx which is dimensionless(ratio).
dx=1e-2; ## Increment in the horizontal distance (m)
c1=300; ## speed of the left one (m/s)
c2=500; ## Speed of the rigth one (m/s)
dt=dx/max(c1,c2); ## Increment in time (s). The max c, the min dt.
r1=c1*dt/dx; ## Ratio r for the left one
r2=c2*dt/dx; ## Ration r for the right one
x=-1:dx:1; ## same as the string_fixed
l=length(x);
x0=0.5;
k=1e2;
## Inital profile(return to guassuian distibution)
y=initial_profile(x,x0,k);
axis([-1.05,1.05,-1.1,1.1])
plot(x,y,'r;;',[0 0],[-1.1 1.1],'r-;;')
pause
## Boundary conditions while t=dtn=0
ynow=y;
yprev=y;
N=100;
for n=1:N
ynext=propagate_two_parts(ynow,yprev,r1,r2); ## calling the prepared
## function
plot(x,ynext,';;',[0 0],[-1.1 1.1],'r-;;')
axis([-1.05,1.05,-1.1,1.1])
pause(0);
yprev=ynow;
ynow=ynext;
endfor

Comments

Popular posts from this blog

PHYSICS MACHINE

Physics Machine  Ümit Alkuş  Abstract Physics machine is a software which does physics like a physicist. First, all the things human being has developed so far, for doing physics, will be available to this machine. Secondly, all the consistent theories, successful experiments, and published articles will be included into this machine in the form of traced and readable knowledge, in other words, this machine can read and understand these all. Finally, as the last target, this machine can observe the universe and physical events with the aim of creating theories and physical laws.  METU, Physics Department, 06800, Ankara, Turkey   Keywords: Artificial Intelligence, Machine Learning, Data Mining, Artificial Physicist   Introduction There are approximately millions of articles over physics, huge collection of very successful theories, and physics books. In the earth, no physicist could have attempted to read and understand these accumulations since it re...