rawat

A Generic Decomposition Method to Find FFT (Fast Fourier Transform)

Here is snapshot of the algorithm, which I developed based on a generic decomposition, and further if its prime factorization, it solves in least time.

--------------------------------------------------------------------------------------------------
---------Follwoing Function implements the above algorithm. ------------------------------------
function [rawat_fft] = rawat_fft(signal, numP);
SNames = fieldnames(signal); 
for loopIndex = 1:numel(SNames) 
    if (loopIndex==1)
        tt = signal.(SNames{loopIndex});
    else
        yy = signal.(SNames{loopIndex});
    end
end
tt = tt - tt(1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if nargin < 2
    numP = length(yy); 
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
intep_x = linspace(0,tt(end),numP);
intep_y = spline(tt,yy,intep_x);
N = numP;
NFFT = N;
if (NFFT > numP)
    yz = zeros(1, NFFT-num_point);
    in_x = [intep_y, yz];
else
    in_x = intep_y;
end
%%%%%%%%%%%%%%%%%%%%%
WN = exp(i*2*pi/N);
fac_vec = factor(N);
%%%%%%%%%%%%%%%%%%%%%
for sp_i1 = 1:length(fac_vec)
    if (sp_i1==1)
        sp_succ_mult(sp_i1) = 1;
    else
        sp_succ_mult(sp_i1) = 1;
        for sp_i2 = 1:(sp_i1-1)
            sp_succ_mult(sp_i1) = sp_succ_mult(sp_i1)*fac_vec(sp_i2);
        end
    end
end
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%
space_arr = struct();
for sp_IndexSuccMult=1:length(sp_succ_mult)
    sp_valnam = num2str(sp_IndexSuccMult);
    sp_valnam_data = [0:(fac_vec(sp_IndexSuccMult)-1)];
    space_arr = setfield(space_arr, sprintf('sp_succ_mult_%s',char(sp_valnam)), sp_valnam_data);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for rsp_i1 = 1:length(fac_vec)
    if (rsp_i1==1)
        rsp_succ_mult(rsp_i1) = 1;
    else
        rsp_succ_mult(rsp_i1) = 1;
        for rsp_i2 = 1:(rsp_i1-1)
            rsp_succ_mult(rsp_i1) = rsp_succ_mult(rsp_i1)*fac_vec(end - rsp_i2 + 1);
        end
    end
end
reciproc_space_arr = struct();
for rsp_IndexSuccMult=1:length(rsp_succ_mult)
    rsp_valnam = num2str(rsp_IndexSuccMult);
    rsp_valnam_data = [0:(fac_vec(end - rsp_IndexSuccMult + 1)-1)];
    reciproc_space_arr = setfield(reciproc_space_arr, sprintf('rsp_succ_mult_%s',char(rsp_valnam)), rsp_valnam_data);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
space_cell = struct2cell(space_arr);
reciproc_space_cell = struct2cell(reciproc_space_arr);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[sp_mix{1:length(space_cell)}]=ndgrid(space_cell{:});
sp_ind = zeros(length(sp_mix{1}(:)),1);
for km_0 = 1:length(space_cell)
    sp_ind = sp_ind + sp_succ_mult(km_0)*sp_mix{km_0}(:);
end
for NewEntry_ind = 1:length(sp_ind)
    NewEntry = length(space_cell)+1;
    sp_mix{NewEntry}(NewEntry_ind) = in_x(NewEntry_ind);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%for top_ind = 1:1
for top_ind = 1:length(fac_vec)
    wn_term(top_ind) = sp_succ_mult(end - top_ind + 1);
    if (top_ind == length(fac_vec))
        [sp_mix{1:length(space_cell)}] = ndgrid(reciproc_space_cell{1:top_ind});
    else
        [sp_mix{1:length(space_cell)}] = ndgrid(reciproc_space_cell{1:top_ind},space_cell{1:end-top_ind});
    end
    if (top_ind == 1)
        temp_off(top_ind) = sp_succ_mult(end);
    else
        temp_off(top_ind) = 1;
        for g1 = 1:length(fac_vec)-1
            if (g1 <= top_ind-1)
                temp_off(top_ind) = temp_off(top_ind)*fac_vec(end - g1 + 1);
            else
                temp_off(top_ind) = temp_off(top_ind)*fac_vec(g1 - top_ind + 1);
            end
        end
    end
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    for NewEntry_ind = 1:length(sp_mix{end}(:))
        fft_x(NewEntry_ind) = 0;
        mod_vec(top_ind,:) = [rsp_succ_mult(top_ind) fac_vec(end - top_ind + 1)]; 
        mod_1st = mod(NewEntry_ind, mod_vec(top_ind,1));
        if (mod_1st == 0)
            q_1st = NewEntry_ind/mod_vec(top_ind,1);
            mod_2nd = mod(q_1st,mod_vec(top_ind,2));
            if (mod_2nd == 0)
                effind(NewEntry_ind) = mod_vec(top_ind,1)*(NewEntry_ind/mod_vec(top_ind,1)/mod_vec(top_ind,2));
            else
                effind(NewEntry_ind) = mod_vec(top_ind,1)*((q_1st - mod_2nd)/mod_vec(top_ind,2) + 1);
            end
        else
                effind(NewEntry_ind) = mod_vec(top_ind,1)*...
                                      (NewEntry_ind - mod(NewEntry_ind,mod_vec(top_ind,1)*mod_vec(top_ind,2)))/...
                                       mod_vec(top_ind,1)/mod_vec(top_ind,2) +... 
                                       mod(NewEntry_ind,mod_vec(top_ind,1));
        end
        %%%%%%%%%%%%%%%%%%%%%%%%%%%
        for sum_ind = 1:length(space_cell{end - top_ind + 1})
            partial_reci(NewEntry_ind) = 0;
            for tr_reconst = 1:top_ind
                partial_reci(NewEntry_ind) = partial_reci(NewEntry_ind) + ... 
                                             sp_mix{tr_reconst}(NewEntry_ind)*rsp_succ_mult(tr_reconst);
            end
            fft_x(NewEntry_ind) = fft_x(NewEntry_ind) + ...
                                  sp_mix{end}(effind(NewEntry_ind)+(sum_ind-1)*temp_off(top_ind))*...
                                  WN^(partial_reci(NewEntry_ind)*wn_term(top_ind)*space_cell{end - top_ind + 1}(sum_ind));
        end
    end
    NewEntry = length(space_cell)+1;
    for feed_ind = 1:length(fft_x)
        sp_mix{NewEntry}(feed_ind) = fft_x(feed_ind);
    end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rawat_fft.fouval = fft_x;

On derivation of angular momentum quantization numbers

















Semiclassical Energy & Dynamics of 2D square lattice



==================================================================================

Quantum Harmonic Oscillator: Dirac's View, Born-Jordan View, Heisenbrg View, Wave Mechanics View

Here I am writing an analysis of Quantum Harmonic Oscillator in various frameworks:
(1) Dirac's operators' framework
(2) Intermediate Representations
(3) Born & Jordan view
(4) Heisenberg: Anharmonic Oscillator

(1) The analysis which I have written does not contain the Anharmonic Oscillator, as there exist already an amazing explanation of the Heisenberg's 1925 paper "QUANTUM-THEORETICAL RE-INTERPRETATION OF KINEMTICS AND MECHANICAL RELATIONS"  by authors Aitchison I. J. R. et al published in Am. J. Phys. 72 (11), Nov. 2004, 1370-1379 titled "Understanding Heisenberg's "magical" paper of July 1925: A new look at the caculational details".

(2) Although if some readers want the classical anharmonic-oscillator's analytical and numerical solutions, they can write me an email request for that AT surendra.rawat@gmail.com. (I have not uploaded it yet), To understand the Heisenberg's Anharmonic Osc. the classical perturbation analysis is a must deal and therefore one may require classical solutions.

(3) One can download the pdf letter which includes detailed analysis in the frameworks tagged by (1) (2) & (3) as above:
If the below mentioned download link is problematic, then request email can be sent. :)


Prof. Dr. M. K. Harbola on Genesis of Quanta

Here is a link for one of the educational-articles written by Prof. Dr. M.K. Harbola (my Q-phy Hero and my Q-Phy teacher) 
from Physics Department of IIT Kanpur.

In one statement I would like to say that "This text may give you the quantum realization" :)

One may download the text in pdf format from the below link:


Prof. MKH never calls me by my name, instead he has given me a name "Smiley". which one may find at various places on this blog. 
Sorry about that, but cannot really control my smile, With q-phy teachings he has assigned the smiling attribute also with me. :)

RQM Fine Structure of Hydrogen








Fundamental RQM Equation of an electron

Time Dependent Perturbation










------------------End of Entry-------------------------------------------

Heisenberg principle unrolled with formalism

Here I am writing a small letter, which is about, how does Heisenberg Uncertainty principle look in Dirac's and Fourier's formalism....
For any technical discussion write me at surendra.rawat@gmail.com or srawat@quantumrawat.com














------------------------------------------------End of Letter--------------------------------------------------------------------------------

Relativistic Quantum Matrices

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Minkow-Matrix
g = [1 0 0 0;0 -1 0 0;0 0 -1 0;0 0 0 -1];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rho_1 = [0 0 1 0;...
         0 0 0 1;...
         1 0 0 0;...
         0 1 0 0];
rho_2 = [0 0 -i 0;...
         0 0 0 -i;...
         i 0 0 0;...
         0 i 0 0];
rho_3 = [1 0 0 0;...
         0 1 0 0;...
         0 0 -1 0;...
         0 0 0 -1];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sigma_1 = [0 1 0 0;...
           1 0 0 0;...
           0 0 0 1;...
           0 0 1 0];
sigma_2 = [0 -i 0 0;...
           i 0 0 0;...
           0 0 0 -i;...
           0 0 i 0];
sigma_3 = [1 0 0 0;...
           0 -1 0 0;...
           0 0 1 0;...
           0 0 0 -1];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
alpha_0 = [1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1];
alpha_1 = rho_1*sigma_1;
alpha_2 = rho_1*sigma_2;
alpha_3 = rho_1*sigma_3;
alpha_m = rho_3;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
alpha_0_sup = alpha_0;
alpha_1_sup = -alpha_1;
alpha_2_sup = -alpha_2;
alpha_3_sup = -alpha_3;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Blog Software
Blog Software