<?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>陣列運算 &#8211; 龍冥 Blog</title>
	<atom:link href="https://dragongo.co/tag/%e9%99%a3%e5%88%97%e9%81%8b%e7%ae%97/feed/" rel="self" type="application/rss+xml" />
	<link>https://dragongo.co</link>
	<description>Code &#38; Read</description>
	<lastBuildDate>Thu, 26 Aug 2021 08:56:28 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://dragongo.co/wp-content/uploads/2021/05/cropped-cropped-LOGO-2-e1655437907165-32x32.png</url>
	<title>陣列運算 &#8211; 龍冥 Blog</title>
	<link>https://dragongo.co</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>MATLAB逐元運算</title>
		<link>https://dragongo.co/matlab%e9%80%90%e5%85%83%e9%81%8b%e7%ae%97/</link>
		
		<dc:creator><![CDATA[龍冥]]></dc:creator>
		<pubDate>Thu, 26 Aug 2021 08:56:17 +0000</pubDate>
				<category><![CDATA[MATLAB]]></category>
		<category><![CDATA[程式教學]]></category>
		<category><![CDATA[逐元運算]]></category>
		<category><![CDATA[陣列運算]]></category>
		<guid isPermaLink="false">https://dragongo.co/?p=1695</guid>

					<description><![CDATA[你有在寫MATLAB的時候，覺得他的乘除法怪怪的&#8230;]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">你有在寫MATLAB的時候，覺得他的乘除法怪怪的，不如你的預期嗎？<br>有可能是你沒有使用逐元運算來去做乘除造成的，若直接輸入＊／的符號時，會做數學的矩陣運算，試試看在符號前面再加上「．」，變成逐元乘除法，來解決你遇到的疑惑?</p>



<h2 class="wp-block-heading">陣列運算（array peration）或逐元運算（element by element operation；元素對元素）</h2>



<figure class="wp-block-table is-style-regular"><div class="pcrstb-wrap"><table><thead><tr><th>符號</th><th>運算形式</th><th>範例</th></tr></thead><tbody><tr><td>.*</td><td>陣列乘法</td><td>A.*B</td></tr><tr><td>./</td><td>陣列右除</td><td>A./B</td></tr><tr><td>.\</td><td>陣列左除</td><td>A.\B</td></tr><tr><td>.^</td><td>陣列指數運算</td><td>A.^B</td></tr></tbody></table></div></figure>



<p class="wp-block-paragraph">需要注意逐元運算中，需要兩個相同維度大小的陣列才能運算，若是不同維度的運算，會產生錯誤訊息。</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="254" height="330" src="https://dragongo.co/wp-content/uploads/2021/08/image-19.png" alt="image 19" class="wp-image-1699" title="MATLAB逐元運算 1" srcset="https://dragongo.co/wp-content/uploads/2021/08/image-19.png 254w, https://dragongo.co/wp-content/uploads/2021/08/image-19-231x300.png 231w" sizes="(max-width: 254px) 100vw, 254px" /></figure></div>



<h2 class="wp-block-heading"><a href="https://zh.wikipedia.org/wiki/%E7%9F%A9%E9%99%A3%E4%B9%98%E6%B3%95" target="_blank" data-type="URL" data-id="https://zh.wikipedia.org/wiki/%E7%9F%A9%E9%99%A3%E4%B9%98%E6%B3%95" rel="noreferrer noopener">矩陣運算</a>（matrix operation）</h2>



<figure class="wp-block-table is-style-regular"><div class="pcrstb-wrap"><table><thead><tr><th>符號</th><th>運算形式</th><th>範例</th></tr></thead><tbody><tr><td>*</td><td>乘法</td><td>A*B</td></tr><tr><td>/</td><td>右除</td><td>A/B</td></tr><tr><td>\</td><td>左除</td><td>A\B</td></tr><tr><td>^</td><td>指數運算</td><td>A^B</td></tr></tbody></table></div></figure>



<p class="wp-block-paragraph"></p>



<div class="wp-block-image"><figure class="aligncenter size-full is-resized"><img decoding="async" src="https://dragongo.co/wp-content/uploads/2021/08/image-18.png" alt="image 18" class="wp-image-1696" width="196" height="727" title="MATLAB逐元運算 2" srcset="https://dragongo.co/wp-content/uploads/2021/08/image-18.png 158w, https://dragongo.co/wp-content/uploads/2021/08/image-18-81x300.png 81w" sizes="(max-width: 196px) 100vw, 196px" /><figcaption>有無逐元運算，會得到不同的結果</figcaption></figure></div>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
