Rank: 1440 based on 47 downloads (last 30 days) and 4 files submitted
photo

Shalin Mehta

E-mail
Company/University
Marine Biological Laboratory
Lat/Long
41.52740097045898, 70.66310119628906

Personal Profile:

HFSP Postdoctoral Fellow - Optical microscopy (current)
PhD - Optical microscopy (2010),
Father of Shashvat (2009),
Husband of Nalinee (2006),
MTech - Information & Communication Technology (2004),
BE - Electronics & Comm Engg (2002)

Professional Interests:
Image processing, Image formation, Optics, Microscopy, Signal processing, Cytoskeleton

 

Watch this Author's files

 

Files Posted by Shalin View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
30 Nov 2011 Screenshot Shift matrix Fast and convenient function for shifting a matrix in 2D. Author: Shalin Mehta shift, matrix manipulation, interp2, circular shift 12 0
30 Nov 2011 Screenshot SimPartCohImg: Simulate images produced by microscopy and lithography systems Accurate computation of 3D images produced by partially coherent imaging systems. Author: Shalin Mehta phasecontrast, darkfield, lithography, aerial image, image formation, partially coherent 15 0
11 May 2011 Screenshot pseudo symbolic computation with anonymous functions Using anonymous functions to compute instantaneous correlation with symbolic-looking code. Author: Shalin Mehta anonymous function, symbolic computation, wigner distribution, ambiguity function, instantaneous correla... 5 0
11 May 2011 Screenshot Interplay of fft, ifft, fftshift, and ifftshift in MATLAB This file clarifies assumptions about the position of origin in computation of DFT Author: Shalin Mehta fft, ifftshift, fftshift, ifft, real and even, pupil 15 0
Comments and Ratings by Shalin View all
Updated File Comments Rating
08 Dec 2011 Hardware accelerated 3D viewer for MATLAB A set of demonstrations that show how to install and use an accelerated 3D viewer for MATLAB. Author: Jean-Yves Tinevez

Hello, Nice work. I am running into problems with MATLAB R2011b on MAC OS Lion (Java VM Version: Java 1.6.0_29-b11-402-11M3527 with Apple Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode) .

When I try to execute universe.show() from the first demonstration, I encounter following error. It looks like a permission related issue, but I cannot figure out how to resolve this.
----------------------------------------

Error using ij3d.Image3DUniverse/show
Java exception occurred:
java.lang.SecurityException: sealing violation: package javax.media.j3d is sealed
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at com.mathworks.jmi.CustomURLClassLoader.findClass(ClassLoaderManager.java:754)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at com.mathworks.jmi.CustomURLClassLoader.findClass(ClassLoaderManager.java:754)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at ij3d.ImageWindow3D.<init>(ImageWindow3D.java:64)
at ij3d.Image3DUniverse.show(Image3DUniverse.java:195)

18 May 2010 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu

You're welcome. ifftshift is the same as fftshift for even length sequence, but different for odd length. So if one uses fftshift(fft(ifftshift(...))) things work well. By the way, scaling by dt and df to correct for scaling introduced by FFT algorithm is neat trick.

14 May 2010 Why use fftshift(fft(fftshift(x))) in Matlab instead of fft(x)? Explain why we use fftshift(fft(fftshift(x))) in Matlab instead of fft(x) Author: Kan Wu

There is a problem with above recipe. It fails when you have sequence of odd length. Correct recipe is:
fftshift(fft(ifftshift(sig))) or fftshift(ifft(ifftshift(spectrum))).

A description of this can be found on my submission on fftshift, ifftshift.

To observe that above is true, run the following code with fftshift and ifftshift on inner call for computing Xfinal.
-------------------------
Bx = 50;
A = sqrt(log(2))/(2*pi*Bx);
fs = 500; %sampling frequency
dt = 1/fs; %time step
T=1; %total time window
t = -T/2:dt:T/2; %time grids
df = 1/T; %freq step
Fmax = 1/2/dt; %freq window
f=-Fmax:df:Fmax; %freq grids, not used in our examples, could be used by plot(f, X)

x = exp(-t.^2/(2*A^2));
Xan = A*sqrt(2*pi)*exp(-2*pi^2*f.^2*A^2); %X(f), analytical Fourier transform of x(t), real
Xfft = dt * fft(x); %directly using fft()
Xfftshift = dt * fft(fftshift(x)); %using fftshift() before fft()
Xfinal = dt * fftshift(fft(ifftshift(x))); %identical with analytical X(f), also note dt
subplot(211); plot(f,Xan,f,real(Xfinal),'--');
subplot(212); plot(f,imag(Xfinal));

31 Dec 2008 Zernike decomposition Decomposition of a 2-D function by set of Zernike functions Author: Alex Chtchetinine

This is a good code for illustrating the idea of Zernike decomposition

Top Tags Applied by Shalin
aerial image, ambiguity function, anonymous function, circular shift, darkfield
Files Tagged by Shalin View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
30 Nov 2011 Screenshot Shift matrix Fast and convenient function for shifting a matrix in 2D. Author: Shalin Mehta shift, matrix manipulation, interp2, circular shift 12 0
30 Nov 2011 Screenshot SimPartCohImg: Simulate images produced by microscopy and lithography systems Accurate computation of 3D images produced by partially coherent imaging systems. Author: Shalin Mehta phasecontrast, darkfield, lithography, aerial image, image formation, partially coherent 15 0
11 May 2011 Screenshot pseudo symbolic computation with anonymous functions Using anonymous functions to compute instantaneous correlation with symbolic-looking code. Author: Shalin Mehta anonymous function, symbolic computation, wigner distribution, ambiguity function, instantaneous correla... 5 0
11 May 2011 Screenshot Interplay of fft, ifft, fftshift, and ifftshift in MATLAB This file clarifies assumptions about the position of origin in computation of DFT Author: Shalin Mehta fft, ifftshift, fftshift, ifft, real and even, pupil 15 0

Contact us at files@mathworks.com