Wednesday, December 14, 2011

Difference between pcolor() and imagesc() in Matlab

A simple matrix is plotted using both pcolor() and imagesc() commands in Matlab. And the difference between them are shown in the following figure:

% Difference between pcolor and imagesc
A=[ 1  2  3  4;
    5  6  7  8;
    9 10 11 12;];
figure (1); clf; set(gcf,'Color',[1 1 1]);
subplot(1,2,1);
pcolor(A); colorbar;
title('pcolor(A)')
subplot(1,2,2);
imagesc(A); colorbar;
title('imagesc(A)')


Basically, pcolor() does not show the last column and row of the matrix. Although the original matrix is 3x4, the pcolor() plot shows 2x3 submatrix.

Wednesday, November 23, 2011

Plotting solid markers in Matlab plots

To get a solid marker in Matlab plots, basically include:


plot(sin(x),'-ro','MarkerSize',10,'MarkerFaceColor','g');

Regular marker
Solid Marker





Monday, November 14, 2011

Apparatus and Method to Identify Targets through opaque barriers


 An interesting patent on identifying targets behind barriers

Link to the pdf
https://docs.google.com/open?id=0B8xHYz1JDbd0RzZvMzJDbGV2Ym8

Comment later

Sunday, November 13, 2011

Standing Wave Patterns in Medium with Multiple Interfaces

The generation of standing wave patterns in a medium with three different dielectric permittivities. The reflection and transmission along the two interfaces are shown. Since there are infinitely many reflections, only the overall left and right traveling and the total waves are shown in the animation. When the total traveling field is plotted in space at different time instants (as in the bottom figure), the standing wave patterns can easily be observed.

For similar animations involving a single interface, see below:



Standing Wave Pattern (SWR) and Propagation in Lossy Medium

Standing Wave Pattern (SWR) and Propagation in a Lossless Medium



Phased Array Beam Steering Animation


Beam steering via phased antenna arrays is demonstrated. The arrays are  composed of 7 point sources uniformly spaced in a linear fashion (uniform linear array (ULA). The antenna separation is denoted by the parameter d. When the separation is smaller, the directivity of the array is narrower. Each antenna element in the array is fed with a relative phase shift of "delta" with respect to the adjacent on (the rightmost antenna is the reference antenna where no phase shift is applied, i.e. delta=0).

Sunday, October 30, 2011

"Some Postscript specials could not be rendered" error




This is a problem encountered while practicing with MikTex and WinEdt in the windows environment. Solution is simple: Select dvips option from the Render Menu. This should solve the problem.

Metric (TFM) file not found error

While using pifont package and ding expression, I had the following error with the Latex:

! Font U/psy/m/n/12=psyr at 12.0pt not loadable: Metric (TFM) file not found.
<to be read again>

relax

l.64 {\Pifont{psy}

}

?
This is partially solved by dowloading the "symbol" package from the Package manager of the MiKTex

Wednesday, October 19, 2011

Changing the location of multiple screens/monitors in Windows 7

If you have multiple screens, you can change their respective locations by simply dragging and dropping the desired monitor wherever you want using the Windows 7 settings menu.

Basically, under Control Panel, go to Display menu and choose Adjust resolution option. The following window will pop up and then you can simply drag and drop.

     

Friday, October 14, 2011

Adding subdirectories to the CVS repository


Assume a scenario where you create a new directory for testing your source code and you want to check in this new directory to the CVS. However, this directory has several subdirectories and the subdirectories also have some subdirectories as well. (e.g. consider a scenario where the test results and input files for a certain action are stored independently for a given subdirectory).

To check in the main directory and subdirectories, you can perform the following steps:
  • First add the main directory to the CVS by typing
cvs add main_directory


This will schedule the addition of this directory to the CVS repository. However, a cvs commit is still necessary.
  •  Then cvs add the subdirectories via
find main_directory -type d -print | xargs cvs add

which basically finds the all subdirectories and schedules their cvs add to the repository
  • Once this is done, cvs commit should be performed for each of the file within the main and subdirectories. Without cvs commit you will not get them updated.

For a detailed description, check this link:


Tuesday, October 11, 2011

How to delete multiple files using TCL?

In TCL, deleting a single file is easy, just type:
file delete filename
However, if you want to delete hundreds of lines, simply typing file delete filenames* does not work. Instead, I found the following to work:
eval file delete [glob filenames*]

Sunday, October 09, 2011

Standing Wave Pattern (SWR) and Propagation in Lossy Medium




This animation serves as complementary to a previously uploaded one (http://www.youtube.com/watch?v=s5MBno0PZjE) where the medium were lossless. This time, the medium onto which the wave is impinging is lossy and we demonstrate the time-domain propagation of a uniform plane wave traveling in the +z direction and normally incident on the medium interface (at z=0). Again, only the electric field intensity is shown.

The top figure shows the incident (blue), reflected (red), incident+reflected (teal) and transmitted field in both media. In the bottom figure, the standing wave patterns created in both media are shown. Also, the decaying nature of the electromagnetic wave due to lossy nature of the medium is evident in the lossy medium.

Sunday, September 11, 2011

Doppler Effect Animation

Monday, August 08, 2011

Adventures of Ibn Battuta: India

Saturday, July 30, 2011

Adventures of Ibn Battuta: Anatolia and Crimea

Friday, July 29, 2011

Effect of Perfectly Matched Layers (PML) in FDTD Simulations


Although it is pretty straightforward for researchers in the field of modeling via FDTD or FEM, PML can puzzle those who do not have any modeling background. Therefore, here we try to simply show what happens with and without a PML in a free space propagation modeling.

Basically, we demonstrate the effects of the perfectly matched layers in finite-difference time-domain (FDTD) simulations. Here, a point source transmits a spherical wave and the simulation domain is truncated in two different ways. In the first case (left one) no PML region is utilized whereas in the second one (right) PML region is included. It is clearly observed that PML absorbs the incoming waves mimicking a infinite domain simulation whereas the simulation without PML, spurious reflections occur due to termination of the computational boundary.

Sunday, July 17, 2011

A Tentative Map for Ibn Battuta's Travel in Black Africa and Andalusia


View Adventures of Ibn Battuta : Black Africa and Andalusia Section in a larger map

This post is in draft version. It will hopefully be expanded later.


References:
1 - The Adventures of Ibn Battuta, Ross E. Dunn, University of California Press, Revised Edition, 2005, pp.277
2 - Ibn Battuta and his Saharan Travels

Wednesday, June 22, 2011

King's Mountain Hike (Oregon)




This was yet another hike with our hiking club during weekday after the job. Trail can be very steep at some points. But the view at the summit deserves that struggle. Definitely lovely view from the top. Descending is way more difficult than ascending. So caution should be practiced.  


Monday, June 13, 2011

Manually installing a Miktex package

If working behind a company firewall preventing you to download and install the Miktex packages automatically, here is a solution to achieve that.

Including source code in Latex without using "verbatim"

It is a nice feature to have the exact (or close) code formats in the latex documents. The following “listings” package achieves that. Here is a link that illustrates this in a clear and concise manner.

Thursday, June 09, 2011

International Reply Coupon: Self Stamped International Shipment

Within US, we can use self-stamped envelopes when we want to pay for the incoming letters. However, I needed to do the same for an international letter. Since I was not able to get the stamps of another country, I had to find a different solution. I discovered the so-called “International Reply Coupon” by which you allow postage free shipment to the international senders.  I just sent several copies to Korea, Brazil and UK. I will share the experience when I can hopefully get the letters back.

Here is the USPS link where you can buy this coupon:
International Reply Coupon

Saturday, June 04, 2011

Evanescent and Propagating Waves


Time domain simulation of a plane wave for different wavenumbers (k). At first the wavenumber is positive real number and keeps reducing down to 0. This constitutes the propagating region where the spatial wavelength (lambda) increases as the wavenumber (k) decreases. Then, wavenumber becomes negative imaginary and increases in magnitude. This region demonstrates the non-propagating or decaying properties of evanescent waves. In the evanescent region, the greater the magnitude of the wavenumber, the faster the wave decays.

Saturday, May 14, 2011

Rome-Milan-Zurich with Eurorail


On the way to Milan (outbound from Rome) the Eurorail has reached 272 km/h which is the record speed on the ground for myself. The coaches are comfortable enough that it is easy to forget that you are speeding that much.

Thursday, May 05, 2011

Sony GPS-CS3 Geo-tagging Performance in Wilson River Trail, Oregon



Last week, I had the chance to go for a short hiking trip on the Tillamook region of Oregon. Specifically, we aimed for the Wilson River Trail. The track was rather narrow so while going back and forth we passed from the same route with a great probability. However, as can be seen in the above snapshots, the geotags for the round trip do not overlap to each other. We can easily see two distinct routes for forward and backward directions. This is kind of disappointing for the performance of the GPS as at some points 5 meters of deviations exist.

Wednesday, May 04, 2011

Electromagnetic Propagation of UWB Short Pulse in Random Medium



Finite-difference time-domain (FDTD) simulation of electromagnetic propagation of a short ultrawideband pulse (central frequency 700 MHz) in random medium. The randomness is achieved via the randomly fluctuating of the dielectric permittivity of the environment.

Also see below:
Oblique Plane Wave Reflection From Half Space
Radiation from a Circularly Tapered Dielectric Waveguide
Right Hand Circular Polarization (RHCP) Animation
Linear Polarization Animation
Left Hand Elliptical Polarization (LHEP) Animation
Standing Wave Pattern (SWR) Animation
Electromagnetic Propagation of UWB Short Pulse in Random Medium


Saturday, April 30, 2011

Geo-tagging two International Flights on April 24, 2010

Istanbul - Amsterdam flight
Amsterdam - Portland, Oregon flight
GPS Tracking of two consecutive international flights by Sony GPS-CS3. The first flight is from Istanbul to Amsterdam via KLM on April 24, 2010 and the second one is from Amsterdam to Portland, Oregon on the same day via Delta Airlines. As long as the GPS unit is close to the window, it is possible to receive sufficient GPS signals (mostly two bars). However, there are intermittent loss of GPS tracking without any apparent reasons. Also, battery life is a concern for long flights as changing batteries dramatically affects the re-connection to the GPS signals while on the move. I recommend to get connected to the GPS satellites before or during taxiing as well as utilizing a long-life battery.

For another posting on geo-logging, please check the following link:
Sony GPS-CS3KA Review (Geo-tagging) and Performance in the Airplane

Friday, April 29, 2011

Power Divider Waveguides using Periodic Band Gap Structure - FDTD Simulation



This is the third of the series for the waveguiding structures using the periodic band gap materials (The first one is at: http://www.youtube.com/watch?v=gZkFVco4kL4).

In this video, a power divider made out of periodic boundary conditions is demonstrated. The frequency of operation is 11.085 GHz. The relative dielectric permittivity of the square blocks are 11.56 and the ambient medium is air. Each block is 3.5 mm x 3.5 mm.

Originally, this was inspired by the following video:
http://www.youtube.com/watch?v=O-6l0bvAda0

The main reference is the below dissertation:
Marcelo Bruno Dias, "Estudo da Propagação de Ondas Eletromagnéticas em Estruturas Periódicas". Graduation Dissertation - Electrical Engineering Course, Universidade Federal do Pará (UFPA), Belém, Pará Brazil, 2003.

More details can be found in their lab web site:
www.lane.ufpa.br/publicacoes.html


Also see below:
Oblique Plane Wave Reflection From Half Space
Radiation from a Circularly Tapered Dielectric Waveguide
Right Hand Circular Polarization (RHCP) Animation
Linear Polarization Animation
Left Hand Elliptical Polarization (LHEP) Animation
Standing Wave Pattern (SWR) Animation
Electromagnetic Propagation of UWB Short Pulse in Random Medium 
Half Wavelength Dipole Antenna Radiation 
Dipole Antenna Radiation 
Dish Antenna Animation (Parabolic reflector) 
FDTD Simulation of a Half Convex Lens

Sunday, April 03, 2011

Parallel Waveguides using Periodic Band Gap Structure - FDTD Simulation



This is the second of the series for the waveguiding structures using the periodic band gap materials (The first one is at: Periodic Band Gap (PGB) Waveguide and Propagation - FDTD Simulation).

Here, two simultaneous simulations are shown. In the right one, both excitations are in-phase (cosine-cosine) whereas in the left, the excitations are out of phase by 90 degrees (sine-cosine).

Originally, this was inspired by the following video:
http://www.youtube.com/watch?v=O-6l0bvAda0
Guiding EM waves via periodic structure. The frequency of operation is 11.085 GHz. The relative dielectric permittivity of the square blocks are 11.56 and the ambient medium is air. Each block is 3.5 mm x 3.5 mm.

The main reference is the below dissertation:
Marcelo Bruno Dias, "Estudo da Propagação de Ondas Eletromagnéticas em Estruturas Periódicas". Graduation Dissertation - Electrical Engineering Course, Universidade Federal do Pará (UFPA), Belém, Pará Brazil, 2003.

More details can be found in their lab web site:
www.lane.ufpa.br/publicacoes.html

Also see below:
Half Wavelength Dipole Antenna Radiation
Oblique Plane Wave Reflection From Half Space
Radiation from a Circularly Tapered Dielectric Waveguide
Right Hand Circular Polarization (RHCP) Animation
Linear Polarization Animation
Left Hand Elliptical Polarization (LHEP) Animation
Standing Wave Pattern (SWR) Animation
Electromagnetic Propagation of UWB Short Pulse in Random Medium

Thursday, March 31, 2011

Crossing the bridge - Ponte 25 de Abril



This is from my recent trip to Lisbon, Portugal. I was able to catch the evening commuter train to the other side of the Targus River. A beautiful city that deserves more time to spend.

Saturday, March 26, 2011

Periodic Band Gap (PGB) Waveguide and Propagation - FDTD Simulation




Inspired by the following video:
http://www.youtube.com/watch?v=O-6l0bvAda0

Guiding EM waves via periodic structure. The frequency of operation is 11.085 GHz. The relative dielectric permittivity of the square blocks are 11.56 and the ambient medium is air. Each block is 3.5 mm x 3.5 mm.

The main reference is the below dissertation:
Marcelo Bruno Dias, "Estudo da Propagação de Ondas Eletromagnéticas em Estruturas Periódicas". Graduation Dissertation - Electrical Engineering Course, Universidade Federal do Pará (UFPA), Belém, Pará Brazil, 2003.

More details can be found in their lab web site:
www.lane.ufpa.br/publicacoes.html