Sunday, March 31, 2013

Link error when changed from the debug mode to release mode (Intel MKL and Intel Visual Fortran Studio XE for Windows)


From the Intel MKL Link Line Advisor, I was given the following libraries to be linked:

mkl_intel_c_dll.lib mkl_sequential_dll.lib  mkl_core_dll.lib

The snapshot of choices are as follows:





Sunday, February 03, 2013

Warren Lake Hike

For this particular morning hike, we woke up around 4.30 am and reached the traildhead around 6.00 am. After preparations, we started our ascent. The original target was to reach Warren Lake and then continue onwards to Mt. Defiance summit. Although it was February, the weather around the trailhead was clear and not raining. We were even able to spot the stars and played with the iPhone app showing all the constellations. Finally distinguishing and seeing the Big Dipper was great.

The initial part of the hike was very steep and hit me hard. Questions like "what am I doing here?, I should be sleeping in my warm bed" started to come to my mind. But immediately the view of the Columbia Gorge albeit dark was great. So, of course we continued. Around 2500 ft the snow started and there we spotted bear tracks and became a little bit nervous. The team decided to stick together and moved forward. We moved up to 3800 ft and the weather conditions got worse. It got very cold and the snow made it very difficult to move.  So, we decided to go back even before reaching the Warren Lake. After a good breakfast, the descent was tough on the knees but the scenery of the Columbia River and the Gorge near the end of the trail was stunning.

The GPS logs and some photos are below:




 



Sunday, January 20, 2013

Group velocity / Phase velocity Animation



Here, we demonstrate the group and phase velocity phenomena as observed when two signals with different temporal and spectral frequencies (wavelength) are added to each other. The addition creates time varying constructive and destructive interferences along the space. The resulting wave packet travels with the so-called group velocity which is faster than the phase velocity in this case. The wave packet envelope is shown in magenta color in dashed lines. Note that in this particular case, both group and phase velocities are positive. An important interpretation of group velocity is that it represents the velocity at which the energy or information is conveyed along a wave (see Wikipedia for further details). 


Групповая скорость, Gruppengeschwindigkeit, Voortplantingssnelheid, Velocidad de grupo, Grupa rapido, Vitesse de groupe, Velocità di gruppo, 군속도, מהירות חבורה, ჯგუფური სიჩქარე, 群速度, Gruppefart, Prędkość grupowa, Групова швидкість, 群速度, Vận tốc nhóm, Grupphastighet, Grupinis greitis Phasengeschwindigkeit, Velocidad de fase, 相速度, Vitesse d'une onde, Velocità di fase, Фазовая скорость, 位相速度

Tuesday, January 15, 2013

How to Automatically Parse YouTube View Statistics using importxml?

An automatic way to import YouTube video view statistics to Google Spreadsheets is to use importxml() function. In this post, a working example will be demonstrated using the following YouTube playlist:  https://www.youtube.com/playlist?list=PL38214462962EB8A0

First, the page source of the YouTube channel needs to be opened to get which parse value to use while importing the view statistics.As shown below, details of each video is listed under "video-overview" class.


<div class="video-overview">
    <h3 class="video-title-container">

      <a href="/watch?v=WRGfYqqjXDo&amp;list=PL38214462962EB8A0&amp;index=2" class="yt-uix-tile-link yt-uix-sessionlink" data-sessionlink="feature=plpp_video&amp;ei=CPbFlenq67QCFZYUIQodkUULKQ%3D%3D">
        <span class="title video-title "  dir="ltr">Corner Reflector / Retroreflector (FDTD Animation)</span>
      </a>
    </h3>

      <p class="video-details">
        <span class="video-owner">
by <span class="yt-user-name " dir="ltr">meyavuz</span>
        </span>

          <span class="video-view-count">
            151 views
          </span>
      </p>

  </div>

 Thus, in the Google Spreadsheets, we can type the following in one of the cells:

=importxml(A1,"//div[@class='video-overview']")

where cell A1 has the web address of the YouTube playlist we are working with. Once this is done, the spreadsheet will automatically populate the cells with the titles, video uploader and video views etc as shown below:


However, the cells containing the video view count also includes the user name and some other text, e.g. for this playlist, we have "by meyavuz48 views". To extract the video counts from this text, we need to use some of the functions of the Google Spreadsheets. For this particular case, typing

=value(replace(left(C1,len(C1)-5),1,10,""))


will provide the view statistics in integer form as shown below: Basically, "5" in the formula corresponds to number of characters of the word "views". Then, using the "replace" function, the first 10 characters "by meyavuz" are replaced by empty string "". Finally, the text is converted to integer using the "value()" function.




Note that using "video-overview" as the class inside importxml() function provides the titles and view count of each video. If only the video count is sought after, one can use  'video-view-count' keywords as input to the importxml function as:

"=importxml(A1,"//span[@class='video-view-count']")

Also, the full list of Google Spreadsheets function can be found in the following link:
http://support.google.com/drive/bin/static.py?hl=en&topic=25273&page=table.cs&tab=1240296

Monday, January 14, 2013

Nick Eaton Ridge Hike, Oregon

We reached the trailhead around 6.30 and started to hike around 7 am under 0 celcius. The pipes of the waterpacks got frozen, so needed to use the bottle for the water need. Reached the peak around 9.30 am and started descending until we found a nice spot for the breakfast.

Nick Eaton Ridge Hike



Tuesday, January 08, 2013

King's Mountain Hike


We reached the trailhead around 6.30 am and started to hike at 7.00 am. The trail was full of frozen snow making it difficult to walk at some points. Reached the summit around 9 am and had our breakfast. Then we started the descent and reached the trailhead around 11 am.King's Mountain on EveryTrail



Tuesday, January 01, 2013

Snowshoeing at Boy Scout Ridge near White River in Mt. Hood

We reached the trailhead around 7.10 am and got prepared. Started to hike around 7.30 am and hiked until 9.00 am. Had our breakfast and head back to trailhead. Mt. Hood was clearly visible when we started but later it was covered with cloud and not visible. GPS machine stopped working after a while so the track is not complete. I tried to complete it myself hence there is no accurate information after 3.5 km of the track.

Snowshoeing - Boy Scout Ridge






 

Friday, December 28, 2012

Line Smoothing for Matlab plot() command

The regular Matlab plot() command outputs curvy lines as if they are staircased due to the lack of proper antialiasing. A remedy for this is to use the hidden feature of line properties: LineSmoothing (plot(function,'LineSmoothing','on')). One example is shown below:

LineSmoothingDemo
clear all; clc;

% Simple example showing the Line Smoothing property

freq=1e6;        % frequency of operation
omega=2*pi*freq; % angular frequency
T=1/freq;        % period

Nt=10;
dt=T/Nt;

c=3e8;           % speed of light
lambda=c/freq;   % wavelength
k=2*pi/lambda;   % wavenumber

Nx=20;
dx=lambda/Nx;

x=(-6*lambda):dx:(6*lambda);

% Evaluate $$ f(x)= sin(\omegat-kx) $$ at t=0
func= sin(omega*0-k*x);

% Plot
figure(1); clf; set(gcf,'Color',[1 1 1]);
subplot(2,1,1);
plot(x,func,'-b'); hold on;
title('No Line Smoothing');
Xlim([x(1) x(end)])

subplot(2,1,2);
plot(x,func,'-r','LineSmoothing','on')
title('With Line Smoothing');
Xlim([x(1) x(end)])

For more information and other tips on Matlab, please refer to the following website: undocumentedmatlab.com

 

Tuesday, December 25, 2012

Green Point Ridge Hike

We started around 6.30 am to hike aiming to reach North Lake. By 9.30, had our breakfast and kept going. Almost one mile away from North Lake, decided to head back. The trail was full of snow after approximately 1500 ft. Nice view of Columbia Gorge can be seen. On a sunny day, this trail should be a terrific hike. Here is the hike log and some photos:

Green Point Ridge Hike
Snapshots:


Saturday, December 15, 2012

Nesmith Point Hike

We started around 6.30 am for the hike. Hiked uphill until 9.30 and stopped to have the breakfast. Then started our descent. Trail was full of snow after 1500 ft.