summaryrefslogtreecommitdiff
path: root/52/CH4/EX4.3/Example4_3.sce
blob: 9e58c8ec7be5baa6ed228c0b74aca8ac903af178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Example 4.3
//Program to calculate shortest sequence N such that algorithm B runs //faster than A
clear;
clc ;
close ;
i=0;
N=32; //Given
//Calculation of Twiddle factor exponents for each stage
while 1==1
  i=i+1;
  N=2^i;
  A=N^2;
  B=5*N*log2(N);
  if A>B then break;
    end;   
end
disp(N,'SHORTEST SEQUENCE N =');