MaplePrimes - Questions and Posts tagged with matrix
http://www.mapleprimes.com/tags/matrix
en-us2017 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemTue, 22 Aug 2017 22:42:52 GMTTue, 22 Aug 2017 22:42:52 GMTThe most recent questions and posts on MaplePrimes tagged with matrixhttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Questions and Posts tagged with matrix
http://www.mapleprimes.com/tags/matrix
Maple 2017 Copying matrix gives _rtable
https://www.mapleprimes.com/questions/222532-Maple-2017-Copying-Matrix-Gives-rtable?ref=Feed:MaplePrimes:Tagged With matrix
<p>Hey there. </p>
<p>I recently had to install maple 2017, because the licensens for 2016 had expired. </p>
<p>And in the new version, whenever i want to copy a matrix from a result, it gives me an _rtable, and a number. The result is the same, but it makes it harder to read and i am not able to edit values in this copied matrix. </p>
<p>How do i change this?</p>
<p>Hey there. </p>
<p>I recently had to install maple 2017, because the licensens for 2016 had expired. </p>
<p>And in the new version, whenever i want to copy a matrix from a result, it gives me an _rtable, and a number. The result is the same, but it makes it harder to read and i am not able to edit values in this copied matrix. </p>
<p>How do i change this?</p>
222532Wed, 16 Aug 2017 20:54:21 ZThorreignThorreignweighted norm of an expression
https://www.mapleprimes.com/questions/222512-Weighted-Norm-Of-An-Expression?ref=Feed:MaplePrimes:Tagged With matrix
<p>how can we compute wighted norm of a matrix or a vector in maple? </p>
<p>how can we compute wighted norm of a matrix or a vector in maple? </p>
222512Mon, 14 Aug 2017 05:41:19 Zmehdi jafarimehdi jafariExponential Fit Problem
https://www.mapleprimes.com/questions/222409-Exponential-Fit-Problem?ref=Feed:MaplePrimes:Tagged With matrix
<p>See WA30 attached. Why the error? The variable that represents the vector is in vector form. If I need to change this to THAXexa := ([1988.0, 1989.0, 1990.0 , ... etc], datatype=float, is there an easy way to convert the THAXexa matrix?</p>
<p>Thanks, Les <a href="/view.aspx?sf=222409_question/WA30.mw">WA30.mw</a></p>
<p>See WA30 attached. Why the error? The variable that represents the vector is in vector form. If I need to change this to THAXexa := ([1988.0, 1989.0, 1990.0 , ... etc], datatype=float, is there an easy way to convert the THAXexa matrix?</p>
<p>Thanks, Les <a href="/view.aspx?sf=222409_question/WA30.mw">WA30.mw</a></p>
222409Thu, 27 Jul 2017 04:36:28 ZLesLesMatrix monomial orders in Maple
https://www.mapleprimes.com/questions/222367-Matrix-Monomial-Orders-In-Maple?ref=Feed:MaplePrimes:Tagged With matrix
<p>In the Maple help to use a matrix defined monomial order it is said to define a matrix and a list of variables and then typing 'matrix'(M,V). But I fail to use it. A very simple example:</p>
<pre class="prettyprint">
M:=<<1,0>|<0,1>>;
V:=[x,y];
Groebner[LeadingMonomial](y^3+x*y, 'matrix'(M, V));</pre>
<p>But Maple shows this error:<br>
<br>
</p>
<pre class="prettyprint">
Error, invalid input: Groebner:-LeadingMonomial expects its 2nd argument, tord, to be of type {MonomialOrder, ShortMonomialOrder}, but received matrix(Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = 0, (2, 2) = 1}), [x, y])
</pre>
<p>What is wrong?</p>
<p>In the Maple help to use a matrix defined monomial order it is said to define a matrix and a list of variables and then typing 'matrix'(M,V). But I fail to use it. A very simple example:</p>
<pre class="prettyprint">
M:=<<1,0>|<0,1>>;
V:=[x,y];
Groebner[LeadingMonomial](y^3+x*y, 'matrix'(M, V));</pre>
<p>But Maple shows this error:<br />
<br />
</p>
<pre class="prettyprint">
Error, invalid input: Groebner:-LeadingMonomial expects its 2nd argument, tord, to be of type {MonomialOrder, ShortMonomialOrder}, but received matrix(Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = 0, (2, 2) = 1}), [x, y])
</pre>
<p>What is wrong?</p>
222367Thu, 20 Jul 2017 14:34:07 ZAmirHosein SadeghimaneshAmirHosein SadeghimaneshUse ** rather than ^ when printing to file
https://www.mapleprimes.com/questions/222355-Use--Rather-Than--When-Printing-To-File?ref=Feed:MaplePrimes:Tagged With matrix
<p>I am writing a matrix to file where each matrix element is placed on a new line. An example of such code:</p>
<pre class="prettyprint">
restart:
HH:=Matrix([[x**2,x**z,z**12],[2*x,5**y,6**1]]):
filenameHH:=fopen("test.txt",WRITE,TEXT):
nRow,nCol :=LinearAlgebra[Dimension](HH);
for i from 1 to nRow do
for j from 1 to nCol do
fprintf(filenameHH,"%a\n",HH[i,j]):
od:
od:
fclose(filenameHH):
</pre>
<p>When this is printed to file, it will print as the power sign ^ regardless of the input it is given. This particular output file will be read in by another language, and due to this the power symbol "^" is not desired, but instead " ** ". By converting the matrix into a string format and applying string operations, this can be done; but is there a simpler way to do it?</p>
<p>-Yeti</p>
<p>I am writing a matrix to file where each matrix element is placed on a new line. An example of such code:</p>
<pre class="prettyprint">
restart:
HH:=Matrix([[x**2,x**z,z**12],[2*x,5**y,6**1]]):
filenameHH:=fopen("test.txt",WRITE,TEXT):
nRow,nCol :=LinearAlgebra[Dimension](HH);
for i from 1 to nRow do
for j from 1 to nCol do
fprintf(filenameHH,"%a\n",HH[i,j]):
od:
od:
fclose(filenameHH):
</pre>
<p>When this is printed to file, it will print as the power sign ^ regardless of the input it is given. This particular output file will be read in by another language, and due to this the power symbol "^" is not desired, but instead " ** ". By converting the matrix into a string format and applying string operations, this can be done; but is there a simpler way to do it?</p>
<p>-Yeti</p>
222355Tue, 18 Jul 2017 19:28:03 ZAmusingYetiAmusingYetiHow to write the solution of a system of equations to a matrix?
https://www.mapleprimes.com/questions/222354-How-To-Write-The-Solution-Of-A-System?ref=Feed:MaplePrimes:Tagged With matrix
<p>Hello,</p>
<p>I am solving a simple system of algebraic equations in a "for" loop. I would like to write all the values of solutions to a matrix, but I only get the symbols. Here is my code:</p>
<pre class="prettyprint">
A:=1:E:=0.1:L0:=<5,5,5,5>:m0g:=0.05:u:=<-5/4,-1/4,-3/4,-1/4>:v:=<-1/2,-3/2,1/2,1/2>:w:=<0,1,0,-1>:
Force:=Matrix(m,2);
for i from 1 to m do
r1||i:=H||i*L0(i)/(A*E)+H||i/m0g*(arcsinh(V_A||i/H||i)+arcsinh((m0g*L0(i)-V_A||i)/H||i))-sqrt(u(i)^2+v(i)^2);
r2||i:=V_A||i*L0(i)/(A*E)*(m0g*L0(i)/(2*V_A||i)-1)+H||i/m0g*(sqrt(1+((m0g*L0(i)-V_A||i)/H||i)^2)-sqrt(1+(V_A||i/H||i)^2))-abs(w(i));
rozw||i:=fsolve({r1||i, r2||i}, {H||i,V_A||i},H||i=0..1);Force(i,1):=H||i;Force(i,2):=V_A||i;subs(rozw||i,Force(i,..));
end do:
evalf(Force);
</pre>
<p>Thanks in advance,</p>
<p>Iza</p>
<p>Hello,</p>
<p>I am solving a simple system of algebraic equations in a "for" loop. I would like to write all the values of solutions to a matrix, but I only get the symbols. Here is my code:</p>
<pre class="prettyprint">
A:=1:E:=0.1:L0:=<5,5,5,5>:m0g:=0.05:u:=<-5/4,-1/4,-3/4,-1/4>:v:=<-1/2,-3/2,1/2,1/2>:w:=<0,1,0,-1>:
Force:=Matrix(m,2);
for i from 1 to m do
r1||i:=H||i*L0(i)/(A*E)+H||i/m0g*(arcsinh(V_A||i/H||i)+arcsinh((m0g*L0(i)-V_A||i)/H||i))-sqrt(u(i)^2+v(i)^2);
r2||i:=V_A||i*L0(i)/(A*E)*(m0g*L0(i)/(2*V_A||i)-1)+H||i/m0g*(sqrt(1+((m0g*L0(i)-V_A||i)/H||i)^2)-sqrt(1+(V_A||i/H||i)^2))-abs(w(i));
rozw||i:=fsolve({r1||i, r2||i}, {H||i,V_A||i},H||i=0..1);Force(i,1):=H||i;Force(i,2):=V_A||i;subs(rozw||i,Force(i,..));
end do:
evalf(Force);
</pre>
<p>Thanks in advance,</p>
<p>Iza</p>
222354Tue, 18 Jul 2017 17:19:00 ZIzaIza