Showing posts with label Matlab. Show all posts
Showing posts with label Matlab. Show all posts

Saturday, 15 June 2013

AZBEACHBIKES - Home





sikk inc has been producing quality products since 200 1n 2005 we sold our first cruisers and have been perfecting them ever since, we have spawned many imitators over the last few years but no one can match our style , quality or price !don’t sell your soul to the devil and overpay for a lesser quality short cruiser !!
our mens and ladies custom beach cruisers are longer from the seat to the bars for the best most comfortable ride and the colors you want , no short stubby frames like the big box brands in 2013 we introduced our mens 29 in xl cruiser, they feature one of the biggest and longest frames available for bigger and taller riders , once you ride the 29 you will never settle for less late summer we will offer our new “ufo” model that will blow the others away , look for it this july !
we offer a 5 year frame warranty and 12 month on all other components , we stand behind our quality bikes and know you will enjoy cruising in style !!


     For more details Visit Now.
      
                        www.azbeachbikes.com
                                                          


Thursday, 25 April 2013

A lot of money is waiting for You















The Best Opertunity 
Click Below and now sign up then massage me back i guide you all the Tips through you will be Milliners
and Remind in mind you must sign up through this link otherwise i will help you when any one sign up through this i get a massage from site so don't fake okay mind it

If you are designer,data entry operator,SEO,Programer,Article writer,Developer,Engineers,Mathematicians,Ad poster,Report Writer,Forum Poster o Good work then please visit here and signup now and earn lot of money while staying at home.It is the legal way of earning money through internet 

If you have any skills ..........So trust me you will earn a lot of  money while staying at home thanks

Sunday, 10 February 2013

Matlab functions

subplot(3,3,1);
stem([1;zeros(49,1)]);
title('Dirac pulse')
subplot(3,3,2); stem(ones(50,1));
title('Step function')
subplot(3,3,3);
stem([ones(1,5),zeros(1,3)])
title('Rectangular pulse')
subplot(3,3,4);
stem(sin(2*pi/8*(0:15)))
title('Sinusoidal signal')
subplot(3,3,5); stem(sinc(0:0.25:8));
title('"Sinc" signal')
subplot(3,3,6); stem(exp(-(0:15)));
title('e^-^n signal')
subplot(3,3,7);
stem(pow2(-0.5*(0:15)))
title('2^-^0^.^5^n signal')
subplot(3,3,8); stem(3.^(0:15));
title('3^n signal')
subplot(3,3,9); stem(randn(1,16));
title('Gaussian random signal');

%Generate the following signal:
%x(n) = K exp[c n] ,
%where: K = 2, c = −1/12 + jπ / 6 , n􀁠 and n = 0..40 .
c = -(1/12)+(pi/6)*i;
K = 2; n = 0:40;
x = K*exp(c*n);
subplot(2,1,1); stem(n,real(x));
xlabel('Time index n');
ylabel('Amplitude');
title('Real part');
subplot(2,1,2); stem(n,imag(x));
xlabel('Time index n');
ylabel('Amplitude');
title('Imaginary part');

Tuesday, 29 January 2013

single,complete,average link clustring using Matlab


x=input('x=');
y=input('Y=');
subplot(4,1,1);
plot(x,y,'r*');
xlabel('x-Values')
ylabel('Y-Values')
n=length(x);
j=1;
i=1;
k=1;
  while j<n
    for i=i:n-1
       e_dis=sqrt(((x(i+1)-x(j)).^2)+((y(i+1)-y(j)).^2));
       d(k)=e_dis; %#ok<AGROW>
      k= k+1;
    end
    j=j+1;
    i=j;
  end
  display(d);
   m=min(d);
   display('Minimum Distance is');
   display(m)
   subplot(4,1,2)
       Y = pdist(x,'cityblock');
       Z = linkage(d,'complete');
       [H, T] = dendrogram(Z);
       xlabel(' complete_link Dendrogram');
 subplot(4,1,3)
 Y = pdist(x,'cityblock');
       Z = linkage(d,'Average');
       [H, T] = dendrogram(Z);
       xlabel('Average Link_Dendrogram');
       subplot(4,1,4)
       Y = pdist(x,'cityblock');
       Z = linkage(d,'single');
       [H, T] = dendrogram(Z);
       xlabel(' Single Link_Dendrogram');

Average_Link Clustring Using Matlab


x=input('x=');
y=input('Y=');
subplot(2,1,1);
plot(x,y,'r*');
xlabel('x-Values')
ylabel('Y-Values')
n=length(x);
j=1;
i=1;
k=1;
  while j<n
    for i=i:n-1
       e_dis=sqrt(((x(i+1)-x(j)).^2)+((y(i+1)-y(j)).^2));
       d(k)=e_dis; %#ok<AGROW>
      k= k+1;
display(e_dis);

    end
    j=j+1;
    i=j;
  end
   m=min(d);
   display('Minimum Distance is');
   display(m)
   subplot(2,1,2)
       Y = pdist(x,'cityblock');
       Z = linkage(d,'Average');
       [H, T] = dendrogram(Z);
       xlabel('Dendrogram');

complete_link clustring Using Matlab


x=input('x=');
y=input('Y=');
subplot(4,1,1);
plot(x,y,'r*');
xlabel('x-Values')
ylabel('Y-Values')
n=length(x);
j=1;
i=1;
k=1;
  while j<n
    for i=i:n-1
       e_dis=sqrt(((x(i+1)-x(j)).^2)+((y(i+1)-y(j)).^2));
       d(k)=e_dis; %#ok<AGROW>
      k= k+1;
    end
    j=j+1;
    i=j;
  end
  display(d);
   m=min(d);
   display('Minimum Distance is');
   display(m)
   subplot(4,1,2)
       Y = pdist(x,'cityblock');
       Z = linkage(d,'complete');
       [H, T] = dendrogram(Z);
       xlabel(' complete_link Dendrogram');

Single Link clustering using matlab


%Single Link_Clustring
x=input('x=');
y=input('Y=');
subplot(2,1,1);
plot(x,y,'r*');
xlabel('x-Values')
ylabel('Y-Values')
n=length(x);
j=1;
i=1;
k=1;
  while j<n
    for i=i:n-1
       e_dis=sqrt(((x(i+1)-x(j)).^2)+((y(i+1)-y(j)).^2));
       d(k)=e_dis; %#ok<AGROW>
      k= k+1;
display(e_dis);

    end
    j=j+1;
    i=j;
  end
   m=min(d);
   display('Minimum Distance is');
   display(m)
   subplot(2,1,2)
       Y = pdist(x,'cityblock');
       Z = linkage(d,'single');
       [H, T] = dendrogram(Z);
       xlabel('Single link clustring Dendrogram');

Wednesday, 23 January 2013

Returning values from fuction and also passing value to the function in matlab



%--------------Returning values from fuction and also passing value to the functions-------%

a=input('Enter 1st num\n');
b=input('Enter 2nd num\n');
c=input('Enter 3rd num\n');
p=ret(a,b,c);
fprintf('the product of your 3 number is=%d\n',p);
%--------------===============================--------------------------------------------%


  function[z]=ret(a,b,c);
z=a*b*c;

basically in c,c++ we use this syntax as
z=a*b*c;
return z;
but here we return z as
function[z]=ret(a,b,c);
which mean that we return the value of z after calculation to the function ret(a,b,c)which
also contain 3 parameter variable%--------------------------------
 

Value return from function



%---------------------------
main file c is
p=show();
fprintf('cube=%d\n',p);
%--------------------------


 %here i use a program that tell us how value return from function %



function[z]=show();
x=input('Enter any number\n');

z=1;
z=x*x*x;


  in c++ we use this syntax as
%------------------------------
 
 z=x*x*x;
return z;

but here we return the variable in the above function as
syntax as


  function[z]=show();
% that's mean we return z after calculation to the function show() which use in c.m file

if else statement in Matlab




            /* if else in matlab*/



n=input('Enter a number\n');
if(mod(n,2)==0)
    for x=1:1:10
    fprintf('%d*%d=%d\n',n,x,n*x);
    end
   
    else
        for x=5:1:15
        fprintf('%d*%d=%d\n',n,x,n*x);
        end
        end



/*************************************Another syntax is*************************/



            n=input('Enter a number\n');
if(mod(n,2)==0)
    for x=1:1:10
    fprintf('%d*%d=%d\n',n,x,n*x);
    end  
else
        if(mod(n,2)==1)
        for x=5:1:15
        fprintf('%d*%d=%d\n',n,x,n*x);
        end
        end
end

while loop and if statement in matlab


 


          /**************************************************/
             
  if and while loop in matlab
 


               %table %
i=1;
x=input('Enter any number\n');
if(x<10)
    while i<11
        z=x*i;
        fprintf('%d*%d=%d\n',x,i,z);
        i=i+1;
    end
    end

  for loop
 

            %table %
i=1;
x=input('Enter any number\n');
if(x<10)
    for i=1:1:10
        z=x*i;
        fprintf('%d*%d=%d\n',x,i,z);
       
    end
    end

Matlab programing tutorial


Built-in function
  Log();
  Sqrt();
  Area=pi*r^2
  Circumference=2pi*r
  Loops
1)FOR loop
           syntax
                      for i=initial value:increment:termination point
                      statement

                     like As
                     for i=0:1:10

                           statement

e.g.
                            sum=0;
                         for x=1:1:10
                          sum=sum+x;
              fprintf(‘Sum=’,sum);
end
  program
1)sum of all the even # from 0 to 20
  While loop
                                               Syntax
                                         
                                     While i<10
                                         Statement
                                       i=i+1;

            Conditional statement

                         1)If
                                            Syntax
                                                           If(x<10)
                                                          Statement
2)
         if else
                             if(x<10)

                                   statement
                         else
                                  statement
                             
end
end

  plot(x,y)
  x=0:10:1000;
  y=x.^2;
  y=x.^3
  x label(‘x-axis’);
  y label(‘y-axis’);
  title(‘Hello word’);
  Grid on; /*command for graphs*/
  Hold on;/*command for Graph*/
  Z=x^.3
  Plot(x,z);
  Hold off;

       Write a program which input one number if number is even then your program display table of that number but range of table must be o to 15 but if the input number is
And odd number then your program show table of that number which range is o to 10.
Best of luck
n =input(‘Enter a number \n’);
if(mod(n,2)= =0)
for x=0:1:15
fprintf(‘%d*%d=%d\n’,n,x,n*x);
else
for x:0:1:10
fprintf(‘%d*%d=%d\n’,n,x,n*x);
end

  Plot a Graph for specific Range

     Plot(x,a)
Y=[-100:20:100]
Plot(y)
Length(y)
Subplot(2,2,1)
Plot(z)
Subplot(2,2,2)
Plot(y)
Subplot(2,2,3)
  Roots
                                Y=[1 0 4 2 0 9 ]
                           root(y)