[求助]关于矩阵的表示问题
一个矩阵:0 X 2X ``` NX<br> Y X+Y 2X+Y ``` NX+Y<br> 2Y X+2Y 2X+2Y ``` NX+2Y<br> <br> ` ` ` ` <br> ` ` ` `<br> ` ` ` `<br> NY X+NY 2X+NY ``` NX+NY<br>这样的矩阵怎样表示呢?<br>不能直接用<br> A=[]<br>表示!<br>[此贴子已经被FtpAdmin于2006-4-5 10:44:15编辑过]
<P>(0:N)'*ones(1,N+1)*Y+ones(N+1,1)*X*(0:N)'</P> 呵呵……刚在哪个帖子里面看到过,大体意思是这样的吧,偶也记不太清了,不过试了一个好像是对的<BR>呵呵……偶也是新手哦!<BR><BR> = meshgrid(0:N,0:N);<BR>A =X * a + Y * b; 恩,是对的<BR>这样比较简洁 <P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> </FONT>=meshgrid(x,y);其实是<FONT face="Times New Roman">x</FONT>管列数的,<FONT face="Times New Roman">y</FONT>管行数个数<br><br>语句执行后,矩阵X的每一行都是向量x,行数等于向量y的元素的个数,矩阵Y的每一列都是向量y,列数等于向量x的元素的个数。<br></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> = meshgrid(1:3,10:14) </FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm>
<P><FONT face="Times New Roman"></FONT></P>
<br>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman">X =</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm>
<P><FONT face="Times New Roman"></FONT></P>
<p>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 1 2 3</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 1 2 3</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 1 2 3</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 1 2 3</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 1 2 3</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm>
<P><FONT face="Times New Roman"></FONT></P>
<p>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman">Y =</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm>
<P><FONT face="Times New Roman"></FONT></P>
<p>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 10 10 10</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 11 11 11</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 12 12 12</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 13 13 13</FONT></P>
<P -.5? mso-char-indent-count: -5.25pt; TEXT-INDENT: 5.25pt; 0pt 0cm><FONT face="Times New Roman"> 14 14 14<br><br>嘿嘿,在这里天天可以学东西啊,安逸。</FONT></P>
[此贴子已经被作者于2006-4-9 14:32:08编辑过]
回复:(cdwxg)[X,Y] = MESHGRID(x,y) 其实是x管列数...
<P>meshgrid是用来产生三惟绘图网格的啊<BR>能用他来定义这样的一个矩阵吗?</P>回复:(sier)回复:(cdwxg)[X,Y] = MESHGRID(x,y)...
<DIV class=quote><B>以下是引用<I>sier</I>在2006-4-6 18:22:49的发言:</B><BR><P>meshgrid是用来产生三惟绘图网格的啊<BR>能用他来定义这样的一个矩阵吗?</P></DIV>
<br> = meshgrid(x,y,z); %这样是三维的<BR> = meshgrid(x,y);%这样是二维的
啊?
矩阵中的X,Y只是个变量啊,不存在几惟的关系,如果给定:X=1,Y=2,矩阵只是单一的啊回复:(sier)啊?
<DIV class=quote><B>以下是引用<I>sier</I>在2006-4-6 21:38:17的发言:</B><BR>矩阵中的X,Y只是个变量啊,不存在几惟的关系,如果给定:X=1,Y=2,矩阵只是单一的啊</DIV><P>自己仔细看看什么和什么嘛<BR>不要拿你的矩阵和说明比<BR>meshgrid返回的是三个矩阵,换句话说也就是你矩阵里要的系数</P>
页:
[1]