<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>ZeXperT</title>
	<atom:link href="http://zexpert.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://zexpert.org</link>
	<description>LEARN MORE!!</description>
	<pubDate>Mon, 23 Apr 2012 05:23:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>MSN Hacking</title>
		<link>http://zexpert.org/2008/10/msn-hacking/</link>
		<comments>http://zexpert.org/2008/10/msn-hacking/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 17:58:37 +0000</pubDate>
		<dc:creator>Jose</dc:creator>
		
		<category><![CDATA[TROUBLESHOOTING]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=46</guid>
		<description><![CDATA[These two weeks were just tediuous. I suddenly lost all my contacts on Windows Live Messenger for no reason. So I had to struggle for few days just to figure out the source of the problem.
Of course, Struggling included uninstalling/installing the same version of Windows Live Messenger as well as the new 2009 beta version.

And [...]]]></description>
			<content:encoded><![CDATA[<p>These two weeks were just tediuous. I suddenly lost all my contacts on Windows Live Messenger for no reason. So I had to struggle for few days just to figure out the source of the problem.</p>
<p>Of course, Struggling included uninstalling/installing the same version of Windows Live Messenger as well as the new 2009 beta version.</p>
<p><a href="http://zexpert.org/wp-content/uploads/2008/10/22.jpg"><img class="alignnone size-medium wp-image-47" title="22" src="http://zexpert.org/wp-content/uploads/2008/10/22-300x186.jpg" alt="" width="300" height="186" /></a><br />
And my struggling efforts didn&#8217;t go in vain. It seemed there was a synchronization problem, which was resolved by clearing the contact cache on my machine.</p>
<p>After few hours of satisfaction since my contacts were back :), I noticed that I couldn&#8217;t see the Display names of my contacts. All what you could see was the emails of the people. And believe me it is really annoying when you have emails such as acd123@live.com or something like that.<span id="more-46"></span></p>
<p>Again, some struggling with the different view options of contacts, but this time, it wasn&#8217;t good at all. Microsoft support failed to resolve this issue although they were really helpful, and I was astonished with their fast and detailed replies.<br />
<a href="http://zexpert.org/wp-content/uploads/2008/10/22.jpg"><br />
</a></p>
<p>And resolving such issues needs a bit of inspiration. So by mistake, I tried to edit the contact details where you could edit the nickname of the corresponding contacts.<br />
And for no reason, I had the nicknames for all of my contacts set.</p>
<p>Trial and errors works pretty good sometimes, and deleting the nicknames which were already set RESOLVED my issue.<br />
But the question remains, WHO SET THESE NICKNAMES???</p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/10/msn-hacking/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google&#8217;s &#8216;Mail Goggles&#8217;</title>
		<link>http://zexpert.org/2008/10/googles-mail-goggles/</link>
		<comments>http://zexpert.org/2008/10/googles-mail-goggles/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 16:27:44 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[TECH NEWS]]></category>

		<category><![CDATA[beer]]></category>

		<category><![CDATA[friday]]></category>

		<category><![CDATA[gmail]]></category>

		<category><![CDATA[goggles]]></category>

		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=45</guid>
		<description><![CDATA[Friday nights and sending emails, it seems a bit risky !!
But with the new feature introduced by Gmail, you might thank Gmail in the morning for not sending that email.
What are we talking about?
Google&#8217;s &#8220;Mail Goggles&#8221;, a new test-phase feature in Gmail, kicks in late at nights during the weekends where you have to solve [...]]]></description>
			<content:encoded><![CDATA[<p>Friday nights and sending emails, it seems a bit risky !!</p>
<p>But with the new feature introduced by Gmail, you might thank Gmail in the morning for not sending that email.</p>
<p>What are we talking about?</p>
<p>Google&#8217;s &#8220;Mail Goggles&#8221;, a new test-phase feature in Gmail, kicks in late at nights during the weekends where you have to solve few easy math problems before hitting the send button. And based on your answer, you will have your email either sent or saved as a draft.</p>
<p class="inside-copy">Isn&#8217;t it cool? <img src='http://zexpert.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 250x250, Zinpostpic */
google_ad_slot = "8928261017";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></code><br />
In order to activate Goggles, you have to go to the &#8216;Settings&#8217; link on Gmail&#8217;s page and access &#8216;Labs&#8217; section.</p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/10/googles-mail-goggles/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MP3 on Nintendo DS</title>
		<link>http://zexpert.org/2008/10/mp3-on-nintendo-ds/</link>
		<comments>http://zexpert.org/2008/10/mp3-on-nintendo-ds/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 10:52:30 +0000</pubDate>
		<dc:creator>Jose</dc:creator>
		
		<category><![CDATA[TECH NEWS]]></category>

		<category><![CDATA[DS]]></category>

		<category><![CDATA[MP3]]></category>

		<category><![CDATA[Nintendo]]></category>

		<category><![CDATA[player]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=43</guid>
		<description><![CDATA[You might be wondering if you can turn your Nintendo DS into an MP3 player, and this is possible if you have R4DS or M3DS.

The instructions below assume that you already have the R4 or M3 system files installed, since they are usually accompanied with the R4 or M3 package.
The next step will be to [...]]]></description>
			<content:encoded><![CDATA[<p>You might be wondering if you can turn your Nintendo DS into an MP3 player, and this is possible if you have R4DS or M3DS.</p>
<p><a href="http://zexpert.org/wp-content/uploads/2008/10/nintendo-ds-lite.jpg"><img class="alignnone size-medium wp-image-44" title="nintendo-ds-lite" src="http://zexpert.org/wp-content/uploads/2008/10/nintendo-ds-lite-300x236.jpg" alt="" width="300" height="236" /></a></p>
<p>The instructions below assume that you already have the R4 or M3 system files installed, since they are usually accompanied with the R4 or M3 package.</p>
<p>The next step will be to install &#8216;MOONSHELL&#8217; which turns your DS into an mp3/video player besides the other plugins that it supports.<span id="more-43"></span></p>
<p>Download the latest version of MoonShell, you can search google for &#8216;moonshell 171 with dgptools 13&#8242;. After you unzip this file, run the setup, which will guides you through the installation.</p>
<p>At this point in time, make sure that you plug in your USB micro-SD reader which contains the R4 or M3 system files.</p>
<p>Choose the target drive, and in the next window that you will be getting, uncheck all the ROM image except the R4TF R4(DS), and hit the setup button.</p>
<p>And now, after turning on your Nintendo DS, and clicking the second icon, you will have the mp3 player ready.<br />
<code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 2ads 468x60, created 8/27/08 */
google_ad_slot = "4340554183";
google_ad_width = 468;
google_ad_height = 60;
//-->
// &#8211;&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></code></p>
<p>If you have any questions, just post them below the article <img src='http://zexpert.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/10/mp3-on-nintendo-ds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iPHONE 3G</title>
		<link>http://zexpert.org/2008/08/iphone-3g/</link>
		<comments>http://zexpert.org/2008/08/iphone-3g/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 18:31:39 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[TECH NEWS]]></category>

		<category><![CDATA[Iphone 3g]]></category>

		<category><![CDATA[ipod]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=41</guid>
		<description><![CDATA[Nowadays, whenever you see 2 people talking, most probably you will hear the word &#8216;iPhone 3G&#8217; in their conversation!!

That&#8217;s why I was spending some time to look around and read some reviews about this new iPhone to see whether or not it is worth buying. And I found the Cnet review one of the good [...]]]></description>
			<content:encoded><![CDATA[<p>Nowadays, whenever you see 2 people talking, most probably you will hear the word &#8216;iPhone 3G&#8217; in their conversation!!</p>
<p><a href="http://zexpert.org/wp-content/uploads/2008/08/iphone-3g-review-software-01med.jpg"><img class="alignnone size-medium wp-image-42" title="iphone-3g" src="http://zexpert.org/wp-content/uploads/2008/08/iphone-3g-review-software-01med-300x225.jpg" alt="" width="425" height="318" /></a></p>
<p>That&#8217;s why I was spending some time to look around and read some reviews about this new iPhone to see whether or not it is worth buying. And I found the <a rel="nofollow" href="http://reviews.cnet.com/apple-iphone-3g/?tag=sh-main-col;reviews">Cnet</a> review one of the good reviews available on the net since they ran full battery tests showing the results for EDGE talk time, and 3G-enalbled music and video playback. They also did thorough testing of the iPhone 3G&#8217;s features.</p>
<p>Below is a summary of the results shown on their website:</p>
<p style="padding-left: 30px;"><em><strong>The good:</strong> The Apple iPhone 3G offers critical new features including support for high-speed 3G networks, third-party applications, and expanded e-mail. Its call quality is improved and it continues to deliver an excellent music and video experience.</em><span id="more-41"></span></p>
<p class="bottomLine" style="padding-left: 30px;"><em><strong>The bad:</strong> The iPhone 3G continues to lack some basic features that are available on even the simplest cell phone. Also, we prefer the original iPhone&#8217;s design.</em></p>
<p style="padding-left: 30px;"><em><strong>The bottom line:</strong> The iPhone 3G delivers on its promises by adding critical features and sharper performance. The iTunes App Store is pretty amazing, and the 3G support is more than welcome. We still have a few gripes, but the iPhone 3G is a big improvement over the original model.<strong></strong></em></p>
<p style="padding-left: 30px;"><em><strong>Specifications:</strong> OS provided: Apple MacOS X; Band / mode: WCDMA (UMTS) / GSM 850/900/1800/1900; Wireless connectivity: Bluetooth 2.0;</em></p>
<p>One of the new interesting features of the iPhone 3G is the remote wipe where you can erase data in case of a stolen or lost phone as well as its integration with Cisco IPSec VPN for remote network access.</p>
<p>On the other hand, It still lacks some features which are an advantage to have on a device like this:</p>
<p style="padding-left: 30px;"><em><strong>What&#8217;s missing?</strong><br />
We&#8217;ve mentioned already that Apple has stubbornly left out multimedia messaging, stereo Bluetooth, and video recording. But we also wish we&#8217;d gotten a landscape keyboard for messaging, cut and paste, voice dialing, Flash support for the Web browser, tactile feedback for the touch screen and a memory card (or at least a 32GB model). Hopefully, Apple will add these features in time. True, they might also come as third-party applications, but Apple should really be the source for them. We&#8217;d also like the capability to send calendar appointments to contacts and an easier way to transfer files to the iPhone. Because there&#8217;s no way to transfer them via iTunes, you&#8217;ll have to e-mail files to yourself to access them on the iPhone. And even then, there&#8217;s no accessible mass file storage. </em></p>
<p>Regardless of the above, it is still a great device offering lots of critical features with a really good performance, and of course it is an improvement over the original model.<br />
<code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 2ads 468x60, created 8/27/08 */
google_ad_slot = "4340554183";
google_ad_width = 468;
google_ad_height = 60;
//-->
// &#8211;&gt;
// &#8211;&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></code></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/08/iphone-3g/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MATLAB TUTORIAL - PART VIII</title>
		<link>http://zexpert.org/2008/08/matlab-tutorial-part-viii/</link>
		<comments>http://zexpert.org/2008/08/matlab-tutorial-part-viii/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 00:35:18 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[MATLAB]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=40</guid>
		<description><![CDATA[Polynomials in MATLAB are defined according to there coefficients, for example:
f (x) = 5x^4 + 10x^2 + 2x + 7 is defined as :
A=[5 0 10 2 7];
Notice the “0” is added to account 0x^3
To compute the roots of A, type:
&#62;&#62; roots(A)
ans =
0.3323 + 1.1880i
0.3323 - 1.1880i
-0.3323 + 0.8997i
-0.3323 - 0.8997i
To evaluate A at x=3 [...]]]></description>
			<content:encoded><![CDATA[<p>Polynomials in MATLAB are defined according to there coefficients, for example:<br />
f (x) = 5x^4 + 10x^2 + 2x + 7 is defined as :</p>
<p>A=[5 0 10 2 7];</p>
<p>Notice the “0” is added to account 0x^3</p>
<p>To compute the roots of A, type:</p>
<p>&gt;&gt; roots(A)<br />
ans =<br />
0.3323 + 1.1880i<br />
0.3323 - 1.1880i<br />
-0.3323 + 0.8997i<br />
-0.3323 - 0.8997i</p>
<p>To evaluate A at x=3 :<br />
&gt;&gt; polyval(A,3)<br />
ans =<br />
508</p>
<p>Also MATLAB supports symbols and below is a description on how to define symbols and how to do some operations using these symbols.</p>
<ul>
<li>Define a symbolic variable x:</li>
</ul>
<p>&gt;&gt; x=sym(&#8217;x')<br />
x =<br />
x</p>
<ul>
<li>Integrate the following function from t=0 to t=2000:</li>
</ul>
<p>&gt;&gt; int(1/sqrt(12*x+0.02*x^2),0,2000)<br />
ans =<br />
-5/2*2^(1/2)*log(2)+5*2^(1/2)*log(23*2^(1/2)+4*65^(1/2))-5*2^(1/2)*log(3)</p>
<ul>
<li>Get a numeric evaluation of your answer:</li>
</ul>
<p>&gt;&gt; eval(ans)<br />
ans =<br />
19.2740</p>
<p>Instead of inserting the commands one by one on command prompt we can directly write them in form of a code in an M-file.</p>
<ul>
<li>Open an M-File in MATLAB: File-&gt;New-&gt;M-File<span id="more-40"></span></li>
</ul>
<ul>
<li>Type the following into the M-File and run it in order to see the plots:</li>
</ul>
<p>clear all    %Clear all the variables<br />
clc     %clear command prompt<br />
time=0:0.01:10;    %define the time<br />
A=cos(2*time);    %define function A<br />
B=time.*sin(2*time);    %define function B</p>
<p>figure (1) %Open a new Figure and number it as: 1<br />
plot(time,A) %Plot function A<br />
xlabel(&#8217;Time&#8217;) %add a label for the x axis<br />
ylabel(&#8217;Function A&#8217;) %add a label for the y axis</p>
<p>figure (2) %Open a new Figure and number it as: 2<br />
plot(time,B) %Plot function A<br />
xlabel(&#8217;Time&#8217;)<br />
ylabel(&#8217;Function B&#8217;)</p>
<p>And run the code by pressing F5.</p>
<p>Notice that MATLAB will prompt you to save the M-file. Assign a name for the file, and when prompted to change the working directory type “Ok.</p>
<p>Of course you can use the subplot command in order to show several graphs on one figure but I will leave this for you to discover. And you can make the graph clearer when plotting several curves on the same graph using the &#8216;hold on&#8217; by writing the legends but the legend command. And a good title for the graph too is also nice using the title command.</p>
<p>The final thing that we will cover is the use of functions.</p>
<p>As we have seen earlier, we have used an M-file to run a script, but we can also use it as a function by adding the following on top of the M-file:</p>
<p>function [out1, out2, ...] = funname(in1,in2, &#8230;)</p>
<p>where this function has funname as its name with arguments in1,in2,&#8230;</p>
<p>and it returns out1,out2,&#8230;</p>
<p>If we want to call this function from another file, all what we have to do is to write</p>
<p>[A B ...]=funname(in1,in2,&#8230;.) where we put a value for in1,in2,&#8230;.</p>
<p>We should also note that fucntion make use of their own local variables.</p>
<p>In case of any confusion, MATLAB help is really a good source to solve your problem.</p>
<p>And also you can visit <a rel="nofollow" href="http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do">MATLAB central</a> where you can find lots of interesting stuff there.</p>
<p>This is the end of this tutorial.<br />
I hope you enjoyed it!!<br />
<code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 234x60, created 8/24/08 */
google_ad_slot = "8945434220";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></code></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/08/matlab-tutorial-part-viii/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MATLAB TUTORIAL - PART VII</title>
		<link>http://zexpert.org/2008/08/matlab-tutorial-part-vii/</link>
		<comments>http://zexpert.org/2008/08/matlab-tutorial-part-vii/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 00:02:11 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[MATLAB]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=39</guid>
		<description><![CDATA[Element-by-element operations are applied on each element of the array. As we saw earlier, addition and subtraction are already E-B-E. However, multiplication, division and exponentiation are not E-B-E but by adding the dot &#8216;.&#8217; before the operator, it will behave as E-B-E. Of course in this case, matrices should be of the same size.
E-B-E operations [...]]]></description>
			<content:encoded><![CDATA[<p>Element-by-element operations are applied on each element of the array. As we saw earlier, addition and subtraction are already E-B-E. However, multiplication, division and exponentiation are not E-B-E but by adding the dot &#8216;.&#8217; before the operator, it will behave as E-B-E. Of course in this case, matrices should be of the same size.</p>
<p>E-B-E operations are very useful when we have a function F(x), and we want to get the value of F(x) for several values of x. Below is an example showing how to use E-B-E:</p>
<p>&gt;&gt; X=1:6</p>
<p>X =<br />
1     2     3     4     5     6<br />
&gt;&gt; F=X.^2 -3.*X<br />
F =<br />
-2    -2     0     4    10    18</p>
<p>&gt;&gt; Y=cos(X)<br />
Y =<br />
0.5403   -0.4161   -0.9900   -0.6536    0.2837    0.9602</p>
<p>Since from now and on we will be dealing with array, it is a good idea to have a look at the functions used to analyze arrays:</p>
<ul>
<li>mean(M) returns the mean of a vector or array (for each column)</li>
<li>max(M) , min(M) returns the max (min) of a vector M, and the max(min) of each column when M is a matrix</li>
<li>[p n]=max(V) , min(V)  returns the max(min) element in V, and n is the position of this element. If it happens that this max(min) is different positions, it returns the first position</li>
<li>sum(V) returns the sum of elements in vector V</li>
<li>sort(V) arranges the elements of vector V in ascending order</li>
<li>median(V) returns the median value of the elements of V</li>
<li>std(V) returns the standard deviation of the elements of V</li>
<li>det(M) returns the determinant of matrix M</li>
<li>dot(A,B) returns the dot product of A and B (scalar value)</li>
<li>cross(A,B) returns the cross product of A and B<span id="more-39"></span></li>
</ul>
<p>rand command is used to generate uniformly distributed numbers, whose values are between 0 and 1.</p>
<p>It can be used to assign random values to:</p>
<ul>
<li>scalar &gt;&gt; X=rand;</li>
<li>vector&gt;&gt;V=rand(1,n) or rand(n,1)</li>
<li>matrix&gt;&gt;M=rand(m,n) or rand(n) for a square matrix</li>
</ul>
<p>We have also randperm(n) which generates a row vector with n elements that are a random permutation of integers 1 through n.</p>
<p>If we need random numbers belonging to a certain interval (a,b) we can use:</p>
<p>(b-a)* rand(m,n) +a</p>
<p>And if we want to have integers, we can round the above value using the command round.</p>
<p>We have also randn which is the same as rand but numbers are normally distributed with mean 0 and standard deviation 1. And if we want to change the mean and standard deviation, we can use the following command:</p>
<p>sd*randn + M</p>
<p>where sd is the desired standard deviation and M is the desired mean.</p>
<p>In the next tutorial, we will see how to evaluate polynomial, use symbolic math, and plotting. Click below to see the next post.<br />
<code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 234x60, created 8/24/08 */
google_ad_slot = "8945434220";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></code></p>
<p><a href="http://zexpert.org/2008/08/matlab-tutorial-part-viii/">PART VIII</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/08/matlab-tutorial-part-vii/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MATLAB TUTORIAL - PART VI</title>
		<link>http://zexpert.org/2008/08/matlab-tutorial-part-vi/</link>
		<comments>http://zexpert.org/2008/08/matlab-tutorial-part-vi/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 23:24:42 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[MATLAB]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=38</guid>
		<description><![CDATA[Addition and subtraction are element by element operations. To use them, the two or more arrays or vectors that should be summed together of subtracted from each other should be having the same number of rows as well as columns.
On the other hand, multiplication is not an element by element operation, so the multiplication of [...]]]></description>
			<content:encoded><![CDATA[<p>Addition and subtraction are element by element operations. To use them, the two or more arrays or vectors that should be summed together of subtracted from each other should be having the same number of rows as well as columns.</p>
<p>On the other hand, multiplication is not an element by element operation, so the multiplication of 2 matrices is executed according to the rules of linear algebra, where if we have to matrices with sized mxn and pxq, n should be equal to p in order to perform the multiplication that results in an mxq matrix.</p>
<p>As you may know, matrix multiplication is not commutative. And power operations can only be done with square matrices.</p>
<p>When it comes to multiplying vectors, they should be of the same size where one is a row vector and the other is a column vector, and of course the result will be a 1&#215;1 matrix. This is know as the dot product.</p>
<p>Another way to apply the dot product is to use the built-in function dot(A,B).</p>
<p>On the other hand, if we multiply a scalar value with a matrix, we will have this scalar multiplied with all of the elements in the matrix.</p>
<p>To solve linear algebra equations, we can represent any system with matrices.</p>
<p>If we have a system of 3 equations:</p>
<ul>
<li>A1&#215;1 + A2&#215;2 + A3&#215;3 =B1</li>
<li>S1&#215;1 + S2&#215;2 + S3&#215;3 = B2</li>
<li>Z1&#215;1 + Z2&#215;2 + Z3&#215;3 = B3<span id="more-38"></span></li>
</ul>
<p>This can be represents by UX=B</p>
<p>where U=[A1 A2 A3;S1 S2 S3;Z1 Z2 Z3]</p>
<p>X=[x1;x2;x3]</p>
<p>B=[B1;B2;B3]</p>
<p>Before we continue in the solution, we have to introduce array division, which is also associated with the rules of linear algebra. Like the multiplication, it is not and element by element operation.</p>
<p>We have M x M^-1 = M^-1 x M = I</p>
<p>where M^-1 is the inverse of a matrix and can be executed by the command inv(M).</p>
<p>If you like, you can try this using a square matrix in order to make the example simple as well as clear.</p>
<p>Another function that is usually used is the determinant of a matrix which is calculated by the command det(M) where M is a square matrix.</p>
<p>Back to our system of 3 equations, we have</p>
<p>AX=B</p>
<p>X=(A^-1)B</p>
<p>We can calculate it in MATLAB using inv(A)xB or A\B and here we made use of the left division that we introduced earlier in the tutorial.</p>
<p>Below is an example showing how to use the left division;</p>
<p>&gt;&gt; A=[2 3 4;5 4 5;5 6 7];B=[5;6;7];<br />
&gt;&gt; X=A\B<br />
X =</p>
<p>0.1667<br />
-2.6667<br />
3.1667</p>
<p>In the coming tutorial, we will have a look at element by element operations, some array functions, and plotting. Click below to view the next post.<br />
<code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 234x60, created 8/24/08 */
google_ad_slot = "8945434220";
google_ad_width = 234;
google_ad_height = 60;
//-->
// &#8211;&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></code></p>
<p><a href="http://zexpert.org/2008/08/matlab-tutorial-part-vii">PART VII</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/08/matlab-tutorial-part-vi/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MATLAB TUTORIAL - PART V</title>
		<link>http://zexpert.org/2008/08/matlab-tutorial-part-v/</link>
		<comments>http://zexpert.org/2008/08/matlab-tutorial-part-v/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 21:53:12 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[MATLAB]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=37</guid>
		<description><![CDATA[In this part of the tutorial, we will cover how to add or remove elements from already defined variable.
Given a vetor of length n, assigning an element to this vector at position n+3, will add the element at that location and fill n+1 and n+2 with zeros. below is a small example showing what I [...]]]></description>
			<content:encoded><![CDATA[<p>In this part of the tutorial, we will cover how to add or remove elements from already defined variable.</p>
<p>Given a vetor of length n, assigning an element to this vector at position n+3, will add the element at that location and fill n+1 and n+2 with zeros. below is a small example showing what I mean:<br />
&gt;&gt; V=[2 3]<br />
V =<br />
2     3<br />
&gt;&gt; v(4:6)=3:3:9<br />
v =<br />
2     3     5     3     6     9</p>
<p>&gt;&gt; v(10)=6<br />
v =<br />
Columns 1 through 9<br />
2     3     5     3     6     9     0     0     0<br />
Column 10<br />
6</p>
<p>You can also append a vector to another vector as in the following:<br />
&gt;&gt; A=[12 4 5];B=[1:2:6];<br />
&gt;&gt; C=[A B]<br />
C =<br />
12     4     5     1     3     5</p>
<p>Adding elements to a matrix follow the same logic using the addressing techniques that we learned in the previous part of the tutorial, but here we can&#8217;t elements, we have to add new rows or new columns or both.</p>
<p>&gt;&gt; M=[1 3 4 5;3 2 3 5]<br />
M =<br />
1     3     4     5<br />
3     2     3     5<br />
&gt;&gt; M(4,:)=[4 4 4 4]<br />
M =<br />
1     3     4     5<br />
3     2     3     5<br />
0     0     0     0<br />
4     4     4     4<br />
Note that assigning a new value to an element beyond the matrix size, causes MATLAB to increase the matrix size in order to include the new element by assigning zeros to the other newly added elements</p>
<p>Also we can append a matrix to another one as in the following example:<br />
M =<br />
1     3     4     5<br />
3     2     3     5<br />
0     0     0     0<br />
4     4     4     4<br />
&gt;&gt; K=ones(4,2)<span id="more-37"></span><br />
K =<br />
1     1<br />
1     1<br />
1     1<br />
1     1<br />
&gt;&gt; Z=[M K]<br />
Z =<br />
1     3     4     5     1     1<br />
3     2     3     5     1     1<br />
0     0     0     0     1     1<br />
4     4     4     4     1     1</p>
<p>As we saw, adding new elements is an easy task, and same thing can be done to decrease matrix or vector sizes by removing elements, and this is done by using empty brackets []. The example below will show clearly what I am talking about:<br />
U =<br />
3    55    33    95    55<br />
&gt;&gt; U(2)=[]<br />
U =<br />
3    33    95    55<br />
&gt;&gt; U(2:4)=[]<br />
U =<br />
3</p>
<p>Z =<br />
1     3     4     5     1     1<br />
3     2     3     5     1     1<br />
0     0     0     0     1     1<br />
4     4     4     4     1     1<br />
&gt;&gt; Z(:,[2,3,5:6])=[]<br />
Z =<br />
1     5<br />
3     5<br />
0     0<br />
4     4</p>
<p>Of course when removing elements with matrices, we have to examine the dimension properties like you can&#8217;t remove only 1 element from a matrix, but a row or a column or several of these can be removed.</p>
<p>Now since we have a good knowledge about arrays and how to manipulate them, learning some functions might be very useful too:</p>
<ul>
<li>length(V) return number of elements of a vector</li>
<li>size(M) return 2 elements which are the number of rows and number of columns of matrix M</li>
<li>reshape(A,m,n) rearranges matrix A that has k rows and l columns to have m rows and n columns. k*l=m*n</li>
</ul>
<p>&gt;&gt; A=[ 2 3 4 ;6 5 77]<br />
A =<br />
2     3     4<br />
6     5    77<br />
&gt;&gt; B=reshape(A,3,2)<br />
B =<br />
2     5<br />
6     4<br />
3    77</p>
<ul>
<li>diag(v) creates a square matrix where the elements on the diagonal are the elements of the vector v</li>
<li> diag(A) returns the diagonal elements of matrix A</li>
</ul>
<p>We will not go in details about Strings in MATLAB, but we will mention that they are also an array of charaters, and they are created by typing characters within single quotes. The string can contain letters, digits, spaces, or any other symbol example &#8216;fd g123%&#8217;</p>
<p>If a string has a single quote in it, we can do that by typing two single quotes within the string.</p>
<p>We have to note that characters of a string are stored in an array just like number, and a one line string is nothing but a row vector.</p>
<p>To place a string in a matrix, all what we have to do is to use a semicolon as in the following:</p>
<p>&gt;&gt; str=&#8217;fdf% 6&#8242;<br />
str =<br />
fdf% 6<br />
&gt;&gt; mat=[str;'fjg$4 ']<br />
mat =<br />
fdf% 6<br />
fjg$4</p>
<p>It is a good idea if you consult MATLAB&#8217;s help for see the funtion &#8216;char&#8217;.</p>
<p>In the next part of the tutorial, we will deal more with arrays, and complex mathematical operations, with some graphing techniques. Click below to view the next tutorial:<br />
<code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 234x60, created 8/24/08 */
google_ad_slot = "8945434220";
google_ad_width = 234;
google_ad_height = 60;
//-->
// &#8211;&gt;
// &#8211;&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></code></p>
<p><a href="http://zexpert.org/2008/08/matlab-tutorial-part-vi/">PART VI</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/08/matlab-tutorial-part-v/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MATLAB TUTORIAL - PART IV</title>
		<link>http://zexpert.org/2008/08/matlab-tutorial-part-iv/</link>
		<comments>http://zexpert.org/2008/08/matlab-tutorial-part-iv/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 21:14:23 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[MATLAB]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=36</guid>
		<description><![CDATA[Since we will be dealing with matrices a lot, it is always good to learn some matrix and vector operations. And one of the mostly used operations is the transpose operation, where if applied to a vector, it will switch row(column) to column(row), and when it is applied to a matrix, it will switch rows(columns) [...]]]></description>
			<content:encoded><![CDATA[<p>Since we will be dealing with matrices a lot, it is always good to learn some matrix and vector operations. And one of the mostly used operations is the transpose operation, where if applied to a vector, it will switch row(column) to column(row), and when it is applied to a matrix, it will switch rows(columns) to columns(rows). And it is applied when typing &#8216; to the variable as shown in the example below:</p>
<p>&gt;&gt; a3<br />
a3 =<br />
1     3     5<br />
1     3     4<br />
23    41    59</p>
<p>&gt;&gt; a3&#8242;<br />
ans =<br />
1     1    23<br />
3     3    41<br />
5     4    59</p>
<p>And since the basic elemet of MATLAB is the array, it is good to master the addressing of its elements. You can address individual elements or subgroups in a matrix or vector.</p>
<p>In the case of vectors, all you have to do is to execute vector(k) where k is the position of the element that we want. While in the case of matrices, we have to specify the number of row and the number of column of the element wthat we want. so Matrix(k,p) will give you the element at the intersection between row k and column p. Of course you can change the value at that location by executing:</p>
<p>Vector(k)=newvalue</p>
<p>Matrix(k,p)=new value</p>
<p>Here is an example to address an element in a vector:</p>
<p>v =<br />
2     3     5     6    77     7<br />
&gt;&gt; v(3)<span id="more-36"></span><br />
ans =<br />
5</p>
<p>and same thing can be done on a matrix using the above appropriate notation.</p>
<p>Addressing group of elements is a bit tricky, but when you understand it, it is really easy.</p>
<p>For vectors:</p>
<ul>
<li>V(:) refers to all the elements of vector V</li>
<li>V(m:n) refers to the range of elements from location m through location n</li>
</ul>
<p>For Matrices:</p>
<ul>
<li>M(:,n) refers to elements of column n</li>
<li>M(m,:) refers to elements in row m</li>
<li>M(:,l:n) refers to elements in all rows between column l to column n</li>
<li>M(l:n,:) refers to elements in all columns between row l to row n</li>
<li>M(i:j,l:n) refers to elements in row i through j  and columns l through n</li>
</ul>
<p>Below are some examples to pratice so you will grasp the concept:</p>
<p>&gt;&gt; V=[2 3 4 55 33 95  55 ]<br />
V =<br />
2     3     4    55    33    95    55<br />
&gt;&gt; V(3:5)<br />
ans =<br />
4    55    33</p>
<p>a3 =<br />
1     3     5     4<br />
1     3     4     5<br />
23    41    59     4<br />
3     4    55    33<br />
&gt;&gt; a3(2:3,3:4)<br />
ans =<br />
4     5<br />
59     4</p>
<p>If you want to create another vector U which is a subset of vector V where U consists of elements of V at locations 2,4 and from 5 to 7 , you can execute the following command:</p>
<p>V =<br />
2     3     4    55    33    95    55<br />
&gt;&gt; U=V([2,4,5:7])<br />
U =<br />
3    55    33    95    55</p>
<p>And we can apply the same concept to matrices. Assume the following matrix:</p>
<p>a3 =</p>
<p>1     3     5     4<br />
1     3     4     5<br />
23    41    59     4<br />
3     4    55    33</p>
<p>and we want to extract row 1 and 3, and column 1 , and from 3 to 4. This is done by the following command:</p>
<p>&gt;&gt; a4=a3([1,3],[1,3:4])<br />
a4 =<br />
1     5     4<br />
23    59     4</p>
<p>In the coming tutorial, one of the things that we will learn is to add elements to arrays. Click on the link below to view the next tutorial.</p>
<p><code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 234x60, created 8/24/08 */
google_ad_slot = "8945434220";
google_ad_width = 234;
google_ad_height = 60;
//-->
// &#8211;&gt;
// &#8211;&gt;
// &#8211;&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></code></p>
<p><a href="http://zexpert.org/2008/08/matlab-tutorial-part-v/">Part V<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/08/matlab-tutorial-part-iv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MATLAB TUTORIAL - PART III</title>
		<link>http://zexpert.org/2008/08/matlab-tutorial-part-iii/</link>
		<comments>http://zexpert.org/2008/08/matlab-tutorial-part-iii/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 14:56:44 +0000</pubDate>
		<dc:creator>Johnny</dc:creator>
		
		<category><![CDATA[MATLAB]]></category>

		<category><![CDATA[array]]></category>

		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://zexpert.org/?p=35</guid>
		<description><![CDATA[As we have mentioned earlier, Arrays are fundamental forms used to in MATLAB to store and manipulate data.
It is a list of numbers arranged in rows and/or columns. And of course, the simplest array, is a one dimensional array which is know as a Vector.
And a vector can be of 2 forms, either a row [...]]]></description>
			<content:encoded><![CDATA[<p>As we have mentioned earlier, Arrays are fundamental forms used to in MATLAB to store and manipulate data.<br />
It is a list of numbers arranged in rows and/or columns. And of course, the simplest array, is a one dimensional array which is know as a Vector.<br />
And a vector can be of 2 forms, either a row vector or a column vector.<br />
We should note that Arrays can handle numbers as well as charaters and strings.</p>
<p>A one dimensional array, can be used for example to represent the position of a point in space.<br />
Of course, there are several ways to create a vector depending on the source of information which can be specific numbers or mathematical expressions or a series of elements with constant spacing.</p>
<p>Below are some of the different forms:</p>
<ul>
<li>If you have a certain number of data like the profit of a company between in years 1988 1989 1990 1991</li>
</ul>
<p>You can directly represent the info above by:</p>
<p>&gt;&gt; year=[1988 1989 1990 1991]<br />
year =<br />
1988        1989        1990        1991<br />
&gt;&gt; profit=[10000;15000;8000;1000]<br />
profit =<br />
10000<br />
15000<br />
8000<br />
1000</p>
<ul>
<li>Vectors with constant spacing</li>
</ul>
<p>Vector_name=a:n:b</p>
<p>where a is the first term, n is the spacing , and b is the last term.</p>
<p>If we remove n, the default spacing will be equal to 1. Below is a example on how to use this vector spacing:</p>
<p>&gt;&gt; x=2:2:10<br />
x =<br />
2     4     6     8    10<span id="more-35"></span></p>
<ul>
<li>There is also another type of spacing, where you specify the first term, the last term, and how many elements you want in this vector.</li>
</ul>
<p>Vector_name=linspace(a,b,m) where a is the first term, b is the last term, and m is the number of elements. If m is omitted, the the default number is 100.</p>
<p>&gt;&gt; u=linspace(1,5,6)<br />
u =<br />
1.0000    1.8000    2.6000    3.4000    4.2000    5.0000</p>
<p>When it comes to the Two-dimensional Array, it can be wither a square matrix or a general mxn matrix. And here is how to declare a matrix:</p>
<p>Matrix_name=[1st row;2nd row;...; nth row]</p>
<p>Of course, all the rows must have the same number of elements.</p>
<p>Below are some commands which are very useful in matrix creation:</p>
<ul>
<li>Zeros(m.n) and ones(m,n) are used to create and mxn matrix with elements 0 and 1 respectively</li>
<li>eye(n) creates an nxn identity matrix where the diagonal elements are equal to 1</li>
</ul>
<p>Here are some examples below:</p>
<p>&gt;&gt; a=[1 1 2;23 3 4;8 -9 0]<br />
a =<br />
1     1     2<br />
23     3     4<br />
8    -9     0<br />
&gt;&gt; t=4;y=7;u=9;<br />
&gt;&gt; a2=[t y u;t*u y-u y*t;t/y u y]<br />
a2 =<br />
4.0000    7.0000    9.0000<br />
36.0000   -2.0000   28.0000<br />
0.5714    9.0000    7.0000</p>
<p>&gt;&gt; a3=[1:2:6; 1 3 4;linspace(23,59,3)]<br />
a3 =<br />
1     3     5<br />
1     3     4<br />
23    41    59</p>
<p>&gt;&gt; a4=zeros(2,3)<br />
a4 =<br />
0     0     0<br />
0     0     0<br />
&gt;&gt; a5=eye(3)<br />
a5 =<br />
1     0     0<br />
0     1     0<br />
0     0     1<br />
&gt;&gt; a6=ones(2)<br />
a6 =<br />
1     1<br />
1     1</p>
<p>Just to note that, all the variables in MATLAB are arrays where a scalar variable is a one element array, a vector is an array with one row or colums, matrix is an array with elements in both rows and columns.</p>
<p>The good thing in MATLAB, is that it is easy to change the variable type or size.</p>
<p>In the next part, we will continue with arrays, and mentions some operations and array addressing modes. Click below to view the next tutorial.<br />
<code><script type="text/javascript"><!--
google_ad_client = "pub-5115082871348527";
/* 234x60, created 8/24/08 */
google_ad_slot = "8945434220";
google_ad_width = 234;
google_ad_height = 60;
//-->
// &#8211;&gt;
// &#8211;&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></code></p>
<p><a href="http://zexpert.org/2008/08/matlab-tutorial-part-iv/">Part IV</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zexpert.org/2008/08/matlab-tutorial-part-iii/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

