<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MATLAB Archives - ElectricalWorkbook</title>
	<atom:link href="https://electricalworkbook.com/category/matlab/feed/" rel="self" type="application/rss+xml" />
	<link>https://electricalworkbook.com/category/matlab/</link>
	<description>Your Tutor</description>
	<lastBuildDate>Fri, 10 May 2019 22:34:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>MATLAB xlabel</title>
		<link>https://electricalworkbook.com/matlab-xlabel/</link>
					<comments>https://electricalworkbook.com/matlab-xlabel/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:30:23 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=2982</guid>

					<description><![CDATA[<p>The xlabel command put the label on the x-axis of the plot, after reading this MATLAB xlabel topic, you will [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-xlabel/">MATLAB xlabel</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>The xlabel command put the label on the x-axis of the plot, after reading this MATLAB xlabel topic, you will know the theory, and examples, and you will understand how to use </strong><strong>it in MATLAB.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>xlabel(‘text’)</pre>
<p><span id="more-2982"></span></p>
<p><strong>Example:</strong></p>
<p>The statement to plot sine wave in MATLAB is given as</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y)</pre>
<p><strong>Output:</strong></p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-2970" src="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png" alt="" width="563" height="499" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png 563w, https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis-300x266.png 300w" sizes="(max-width: 563px) 100vw, 563px" /></p>
<p>Adding x-axis label “time”, to the plot,</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y) 
xlabel('time')</pre>
<p><strong>Output:</strong></p>
<p><img decoding="async" class="alignnone size-full wp-image-2987" src="https://electricalworkbook.com/wp-content/uploads/2018/10/ylabel.png" alt="" width="563" height="507" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/ylabel.png 563w, https://electricalworkbook.com/wp-content/uploads/2018/10/ylabel-300x270.png 300w" sizes="(max-width: 563px) 100vw, 563px" /></p>
<p>&nbsp;</p>
<p>The post <a href="https://electricalworkbook.com/matlab-xlabel/">MATLAB xlabel</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-xlabel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB ylabel</title>
		<link>https://electricalworkbook.com/matlab-ylabel/</link>
					<comments>https://electricalworkbook.com/matlab-ylabel/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:30:19 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=2983</guid>

					<description><![CDATA[<p>The ylabel command put the label on the y-axis of the plot, after reading this MATLAB ylabel topic, you will [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-ylabel/">MATLAB ylabel</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>The ylabel command put the label on the y-axis of the plot, after reading this MATLAB ylabel topic, you will know the theory, and examples, and you will understand how to use </strong><strong>it in MATLAB.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>ylabel(‘text as string’)</pre>
<p><span id="more-2983"></span></p>
<p><strong>Example:</strong></p>
<p>The statement to plot a sine wave in MATLAB is given as</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y)</pre>
<p><strong>Output:</strong></p>
<p><img decoding="async" class="alignnone size-full wp-image-2970" src="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png" alt="" width="563" height="499" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png 563w, https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis-300x266.png 300w" sizes="(max-width: 563px) 100vw, 563px" /></p>
<p>Adding y-axis label “amplitude”, to the plot,</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y) 
ylabel('amplitude')</pre>
<p><strong>Output:</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2989" src="https://electricalworkbook.com/wp-content/uploads/2018/10/xlabel.png" alt="" width="562" height="507" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/xlabel.png 562w, https://electricalworkbook.com/wp-content/uploads/2018/10/xlabel-300x271.png 300w" sizes="auto, (max-width: 562px) 100vw, 562px" /></p>
<p>The post <a href="https://electricalworkbook.com/matlab-ylabel/">MATLAB ylabel</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-ylabel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB title</title>
		<link>https://electricalworkbook.com/matlab-title/</link>
					<comments>https://electricalworkbook.com/matlab-title/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:30:17 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=2979</guid>

					<description><![CDATA[<p>title() command puts the title on the plot, after reading this MATLAB title topic, you will know the theory and examples. Syntax: [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-title/">MATLAB title</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>title() command puts the title on the plot, after reading this MATLAB title topic, you will know the theory and examples.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>title(‘text’)</pre>
<p><span id="more-2979"></span></p>
<p><strong>Example:</strong></p>
<p>The statement to plot a sine wave in MATLAB is given as</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y)</pre>
<p><strong>Output:</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2970" src="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png" alt="" width="563" height="499" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png 563w, https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis-300x266.png 300w" sizes="auto, (max-width: 563px) 100vw, 563px" /></p>
<p>Adding title label” sine wave” to the plot,</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y)
title('sine wave')</pre>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3020" src="https://electricalworkbook.com/wp-content/uploads/2018/10/matlab_title-1.png" alt="" width="562" height="508" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/matlab_title-1.png 562w, https://electricalworkbook.com/wp-content/uploads/2018/10/matlab_title-1-300x271.png 300w" sizes="auto, (max-width: 562px) 100vw, 562px" /></p>
<p>The post <a href="https://electricalworkbook.com/matlab-title/">MATLAB title</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-title/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB grid</title>
		<link>https://electricalworkbook.com/matlab-grid/</link>
					<comments>https://electricalworkbook.com/matlab-grid/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:29:41 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=2974</guid>

					<description><![CDATA[<p>This command adds or removes grid lines to the plot, after reading this MATLAB grid topic, you will know the theory, and [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-grid/">MATLAB grid</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>This command adds or removes grid lines to the plot, after reading this MATLAB grid topic, you will know the theory, and examples, and you will understand how to use </strong><strong>it in MATLAB.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>grid on 
grid off</pre>
<p><span id="more-2974"></span></p>
<p>Here,</p>
<ul>
<li>grid on command, adds grid to the plot</li>
<li>grid off command to remove grid from the plot</li>
</ul>
<p><strong>Example:</strong></p>
<p>The statement to plot a sine wave in MATLAB is given as</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y)</pre>
<p><strong>Output:</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2970" src="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png" alt="" width="563" height="499" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png 563w, https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis-300x266.png 300w" sizes="auto, (max-width: 563px) 100vw, 563px" /></p>
<p>Adding the grid to the plot,</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y)
grid on</pre>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2975" src="https://electricalworkbook.com/wp-content/uploads/2018/10/grid_plot.png" alt="" width="563" height="506" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/grid_plot.png 563w, https://electricalworkbook.com/wp-content/uploads/2018/10/grid_plot-300x270.png 300w" sizes="auto, (max-width: 563px) 100vw, 563px" /></p>
<p>Removing the grid from the plot,</p>
<pre>x=0:0.1:2*pi; 
y=sin(x); 
plot(x,y)
grid on
grid off</pre>
<p><strong>Output:</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2970" src="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png" alt="" width="563" height="499" srcset="https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis.png 563w, https://electricalworkbook.com/wp-content/uploads/2018/10/plot_axis-300x266.png 300w" sizes="auto, (max-width: 563px) 100vw, 563px" /></p>
<p>The post <a href="https://electricalworkbook.com/matlab-grid/">MATLAB grid</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-grid/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB ones</title>
		<link>https://electricalworkbook.com/matlab-ones/</link>
					<comments>https://electricalworkbook.com/matlab-ones/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:26:40 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=3002</guid>

					<description><![CDATA[<p>This command creates an array of all ones, after reading this MATLAB ones topic, you will know the theory, and examples, [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-ones/">MATLAB ones</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>This command creates an array of all ones, after reading this MATLAB ones topic, you will know the theory, and examples, and you will understand how to create a matrix with all elements one in MATLAB</strong><strong>.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>ones(n)
ones(n,m)</pre>
<p><span id="more-3002"></span></p>
<ul>
<li>For ones(n) represents n columns and n rows.</li>
<li>For ones(n,m) represents n rows and m columns.</li>
</ul>
<p><strong>Example: </strong>To create 2&#215;2 ones matrix.</p>
<pre>ones(2)</pre>
<p><strong>Output:</strong></p>
<pre>ans =

1 1
1 1</pre>
<p><strong>Example: </strong>To create 2&#215;3 ones matrix.</p>
<pre>ones(2,3)</pre>
<p><strong>Output:</strong></p>
<pre>ans =

     1     1     1
     1     1     1</pre>
<p>The post <a href="https://electricalworkbook.com/matlab-ones/">MATLAB ones</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-ones/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB length</title>
		<link>https://electricalworkbook.com/matlab-length/</link>
					<comments>https://electricalworkbook.com/matlab-length/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:26:38 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=3023</guid>

					<description><![CDATA[<p>length() command or function gives the number of elements in a vector or length of largest matrix size, after reading [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-length/">MATLAB length</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>length() command or function gives the number of elements in a vector or length of largest matrix size, after reading this MATLAB length topic, you will know the theory and examples.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>length(n)</pre>
<p><span id="more-3023"></span></p>
<ul>
<li>n can be a vector or matrix.</li>
</ul>
<p><strong>Example: </strong>To find the number of elements in a vector.</p>
<pre>
n=[1,2,3,56];

length(n)</pre>
<p><strong>Output:</strong></p>
<pre>ans =

4</pre>
<p><strong>Example: </strong>To find the number of elements present in each column the matrix.</p>
<pre>
n=[1,2,3;3,2,1;4,5,1;23,2,1]

length(n)</pre>
<p><strong>Output:</strong></p>
<pre>n =

1   2   3
3   2   1
4   5   1
23  2   1


ans =

4</pre>
<p>The post <a href="https://electricalworkbook.com/matlab-length/">MATLAB length</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-length/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB Reshape</title>
		<link>https://electricalworkbook.com/matlab-reshape/</link>
					<comments>https://electricalworkbook.com/matlab-reshape/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:26:28 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=3027</guid>

					<description><![CDATA[<p>reshape() command or function reshapes a matrix or vector, after reading this MATLAB Reshape topic, you will know the theory and [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-reshape/">MATLAB Reshape</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>reshape() command or function reshapes a matrix or vector, after reading this MATLAB Reshape topic, you will know the theory and examples.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>reshape(n,a,b)</pre>
<p><span id="more-3027"></span></p>
<ul>
<li>n is a matrix or vector.</li>
<li>a is numbers of rows.</li>
<li>b is numbers of columns.</li>
</ul>
<p><strong>Example: </strong>To reshape a vector into the matrix.</p>
<pre>
n=[1,2,3,56]

reshape(n,2,2)</pre>
<p><strong>Output:</strong></p>
<pre>n =

1  2  3  56


ans =

1   3
2   56</pre>
<p><strong>Example: </strong>To reshape a matrix into another matrix.</p>
<pre>
n=[2,3;2,1;5,1]

reshape(n,3,2)</pre>
<p><strong>Output:</strong></p>
<pre>n =

     2     3
     2     1
     5     1


ans =

     2     5     1
     2     3     1</pre>
<p>The post <a href="https://electricalworkbook.com/matlab-reshape/">MATLAB Reshape</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-reshape/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB linspace</title>
		<link>https://electricalworkbook.com/matlab-linspace/</link>
					<comments>https://electricalworkbook.com/matlab-linspace/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:26:26 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=3031</guid>

					<description><![CDATA[<p>linspace( ) command or function creates a row vector with elements that are linearly (equally) spaced, after reading this MATLAB [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-linspace/">MATLAB linspace</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>linspace( ) command or function creates a row vector with elements that are linearly (equally) spaced, after reading this MATLAB linspace topic, you will know the theory and examples.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>linspace(xf,xl,n)</pre>
<p><span id="more-3031"></span></p>
<ul>
<li>xf is the first element of the row vector.</li>
<li>xl is the last element of the row vector.</li>
<li>n is the number of elements in the row vector.</li>
</ul>
<p><strong>Example: </strong>To create the row vector having equally spaced elements.</p>
<pre>linspace(0,8,6)</pre>
<p><strong>Output:</strong></p>
<pre>ans =

0 1.6000 3.2000 4.8000 6.4000 8.0000</pre>
<p>The post <a href="https://electricalworkbook.com/matlab-linspace/">MATLAB linspace</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-linspace/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB diagonal matrix</title>
		<link>https://electricalworkbook.com/matlab-diagonal-matrix/</link>
					<comments>https://electricalworkbook.com/matlab-diagonal-matrix/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:26:23 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=3009</guid>

					<description><![CDATA[<p>diag() command or function gives diagonal elements or creates a diagonal matrix, after reading this MATLAB diagonal matrix topic, you [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-diagonal-matrix/">MATLAB diagonal matrix</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>diag() command or function gives diagonal elements or creates a diagonal matrix, after reading this MATLAB diagonal matrix topic, you will know the theory and examples.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>diag(n)</pre>
<p><span id="more-3009"></span></p>
<ul>
<li>n can be a vector or matrix.</li>
</ul>
<p><strong>Example: </strong>To create a 2&#215;2 diagonal matrix having diagonal elements as 1 and 2.</p>
<pre>
n=[1,2];
diag(n)</pre>
<p><strong>Output:</strong></p>
<pre>ans =

1 0
0 2</pre>
<p><strong>Example: </strong>To create a column vector of diagonal elements from the given Matrix.</p>
<pre>
n=[1,2,3;3,2,1;4,5,1]

v=diag(n)</pre>
<p><strong>Output:</strong></p>
<pre>n =

     1     2     3
     3     2     1
     4     5     1


v =

     1
     2
     1</pre>
<p>The post <a href="https://electricalworkbook.com/matlab-diagonal-matrix/">MATLAB diagonal matrix</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-diagonal-matrix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MATLAB mean</title>
		<link>https://electricalworkbook.com/matlab-mean/</link>
					<comments>https://electricalworkbook.com/matlab-mean/#respond</comments>
		
		<dc:creator><![CDATA[Electrical Workbook]]></dc:creator>
		<pubDate>Sun, 23 Dec 2018 10:26:20 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<guid isPermaLink="false">https://electricalworkbook.com/?p=3035</guid>

					<description><![CDATA[<p>mean( ) command or function gives the mean or average value of vector or matrix or array elements, after reading this [&#8230;]</p>
<p>The post <a href="https://electricalworkbook.com/matlab-mean/">MATLAB mean</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>mean( ) command or function gives the mean or average value of vector or matrix or array elements, after reading this MATLAB mean topic, you will know the theory and examples.</strong></p>
<hr />
<h2>Syntax:</h2>
<pre>mean(n)</pre>
<p><span id="more-3035"></span></p>
<ul>
<li>n can be a vector or matrix.</li>
</ul>
<p><strong>Example: </strong>To calculate the mean of vector elements.</p>
<pre>
n=[1,2]; 
mean(n)</pre>
<p><strong>Output:</strong></p>
<pre>ans =

1.5000</pre>
<p><strong>Example:</strong> To create a matrix and calculates the mean of each column.</p>
<pre>
n=[1,2,3;3,2,1;4,5,1] 

v=mean(n)</pre>
<p><strong>Output:</strong></p>
<pre>n =

     1     2     3
     3     2     1
     4     5     1


v =

    2.6667    3.0000    1.6667</pre>
<p><strong>Explanation:</strong></p>
<ul>
<li>2.6667, 3.0000 and 1.6667 is the mean value of the first, second and third column elements respectively.</li>
</ul>
<p>The post <a href="https://electricalworkbook.com/matlab-mean/">MATLAB mean</a> appeared first on <a href="https://electricalworkbook.com">ElectricalWorkbook</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://electricalworkbook.com/matlab-mean/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
