MaplePrimes - Questions and Posts tagged with convert
http://www.mapleprimes.com/tags/convert
en-us2015 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemFri, 27 Mar 2015 15:41:12 GMTFri, 27 Mar 2015 15:41:12 GMTThe most recent questions and posts on MaplePrimes tagged with converthttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Questions and Posts tagged with convert
http://www.mapleprimes.com/tags/convert
Sort Arrays of MAtrix to Ordered Pairs
http://www.mapleprimes.com/questions/203518-Sort-Arrays-Of-MAtrix-To-Ordered-Pairs?ref=Feed:MaplePrimes:Tagged With convert
<p>Hi</p>
<p>I need sort data of an imported matrix to ordered pairs.</p>
<p>'M' is a matrix with 2 columns and unknown numbers of row.</p>
<p> </p>
<p>with(LinearAlgebra):<br><br>M := RandomMatrix(12, 2);</p>
<p>pairs := [M[1], M[2], ... , M[numelems(DeleteColumn(M, [1]))]];</p>
<p>with(CurveFitting):<br><br>PolynomialInterpolation(pairs, x);</p><p>Hi</p>
<p>I need sort data of an imported matrix to ordered pairs.</p>
<p>'M' is a matrix with 2 columns and unknown numbers of row.</p>
<p> </p>
<p>with(LinearAlgebra):<br><br>M := RandomMatrix(12, 2);</p>
<p>pairs := [M[1], M[2], ... , M[numelems(DeleteColumn(M, [1]))]];</p>
<p>with(CurveFitting):<br><br>PolynomialInterpolation(pairs, x);</p>203518Wed, 18 Feb 2015 12:44:57 Zmaple2015maple2015Hexadecimal question
http://www.mapleprimes.com/questions/203459-Hexadecimal-Question?ref=Feed:MaplePrimes:Tagged With convert
<p>I am trying to write a question which asks the student to convert a random decimal number into hexadecimal. I can't get MapleTA to recognize that a correct result is input. I think the problem is that I am not correctly dealing with the hexadecimal number which is represented as a symbol from convert. </p>
<p>In the algorithm section I use:</p>
<p>$dec=range(100,200,5);<br>$hhh=maple("convert($dec,hex)");</p>
<p>The question was:</p>
<p class="p1">Convert the decimal bumber $dec into Hexadecimal. </p>
<p class="p1">In the text input section I use:</p>
<p class="p1">is(($RESPONSE)-($hhh) = 0);</p>
<p class="p1">in the grading section of a Maple graded part of the question. I have tried converting the $RESPONSE to decimal and comparing with $dec.</p>
<p class="p1">I allow the students 4 attempts at each question, so I don't want to do a multiple choice question.</p>
<p class="p1"> </p>
<p class="p1"> </p>
<p class="p1"> </p>
<p class="p1"> </p>
<p> </p>
<p> </p><p>I am trying to write a question which asks the student to convert a random decimal number into hexadecimal. I can't get MapleTA to recognize that a correct result is input. I think the problem is that I am not correctly dealing with the hexadecimal number which is represented as a symbol from convert. </p>
<p>In the algorithm section I use:</p>
<p>$dec=range(100,200,5);<br />$hhh=maple("convert($dec,hex)");</p>
<p>The question was:</p>
<p class="p1">Convert the decimal bumber $dec into Hexadecimal. </p>
<p class="p1">In the text input section I use:</p>
<p class="p1">is(($RESPONSE)-($hhh) = 0);</p>
<p class="p1">in the grading section of a Maple graded part of the question. I have tried converting the $RESPONSE to decimal and comparing with $dec.</p>
<p class="p1">I allow the students 4 attempts at each question, so I don't want to do a multiple choice question.</p>
<p class="p1"> </p>
<p class="p1"> </p>
<p class="p1"> </p>
<p class="p1"> </p>
<p> </p>
<p> </p>203459Tue, 10 Feb 2015 16:30:27 ZcmcneilecmcneileAbout alias: How can one convert back to an expression?
http://www.mapleprimes.com/questions/203432-About-Alias-How-Can-One-Convert-Back?ref=Feed:MaplePrimes:Tagged With convert
<p>Hi!</p>
<p>I use 'alias' to define variable dependencies.<br>But when I want to use the result of my calculation as an expression, I bite the dust; I cannot get rid of the dependencies.<br>Can anyone help me here?<br><br>In the simplified example below, I use the independent variables z[3] and z[4] to define z[1](z[3],z[4]) and z[2](z[3],z[4]).<br>I then introduce a function f[1](z[3],z[4]) and its derivatives df_dz.<br>I introduce the names dz[1]/dz[3]=Dp[1,3], dz[1]/dz[4]=Dp[1,4] etc...<br>When I have calculated df_dz[3], however, I cannot insert values of z[2] without affecting Dp[2,3].<br>Actually, now I have finished my calculation and want df_dz[2,3] to be a regular expression, so that I can insert values of<br>z without affecting the Dp:s.<br>How can I convert df_dz[3] to a regular expression?</p>
<p>alias( seq(z[i]=z[i](seq(z[j],j=3..4)),i=1..2)):<br>alias(f=f(seq(z[j],j=3..4))):<br>alias(seq(seq(Dp[m,n]=diff(z[m](seq(z[j],j=3..4)),z[n]),m=1..2),n=3..4)): <br><br>f:=z[1]-z[2]*z[3]: <br><br>for j from 3 to 4 do<br>df_dz[j]:=diff(f,z[j]);<br>od: <br><br>df_dz[3]; <br>subs(z[2]=4711,df_dz[3]);<br>whattype(Dp[1,3]);<br>whattype(z[3]); <br><br><img src="webkit-fake-url://a263b62c-f170-43e7-9858-b509a873446b/image.tiff" alt=""><br><br><img src="webkit-fake-url://00e4da0f-9c37-458a-b985-513afb096101/image.tiff" alt=""><br><em>function</em><br><br><em> indexed</em></p><p>Hi!</p>
<p>I use 'alias' to define variable dependencies.<br />But when I want to use the result of my calculation as an expression, I bite the dust; I cannot get rid of the dependencies.<br />Can anyone help me here?<br /><br />In the simplified example below, I use the independent variables z[3] and z[4] to define z[1](z[3],z[4]) and z[2](z[3],z[4]).<br />I then introduce a function f[1](z[3],z[4]) and its derivatives df_dz.<br />I introduce the names dz[1]/dz[3]=Dp[1,3], dz[1]/dz[4]=Dp[1,4] etc...<br />When I have calculated df_dz[3], however, I cannot insert values of z[2] without affecting Dp[2,3].<br />Actually, now I have finished my calculation and want df_dz[2,3] to be a regular expression, so that I can insert values of<br />z without affecting the Dp:s.<br />How can I convert df_dz[3] to a regular expression?</p>
<p>alias( seq(z[i]=z[i](seq(z[j],j=3..4)),i=1..2)):<br />alias(f=f(seq(z[j],j=3..4))):<br />alias(seq(seq(Dp[m,n]=diff(z[m](seq(z[j],j=3..4)),z[n]),m=1..2),n=3..4)): <br /><br />f:=z[1]-z[2]*z[3]: <br /><br />for j from 3 to 4 do<br />df_dz[j]:=diff(f,z[j]);<br />od: <br /><br />df_dz[3]; <br />subs(z[2]=4711,df_dz[3]);<br />whattype(Dp[1,3]);<br />whattype(z[3]); <br /><br /><img src="webkit-fake-url://a263b62c-f170-43e7-9858-b509a873446b/image.tiff" alt="" /><br /><br /><img src="webkit-fake-url://00e4da0f-9c37-458a-b985-513afb096101/image.tiff" alt="" /><br /><em>function</em><br /><br /><em> indexed</em></p>203432Fri, 06 Feb 2015 14:22:30 Zconvert the multiplication of two sums into a double sum
http://www.mapleprimes.com/questions/203414-Convert-The-Multiplication-Of-Two-Sums?ref=Feed:MaplePrimes:Tagged With convert
<p>I wish to convert:</p>
<p>Sum(x[k],k=1..n)*Sum(y[k],k=1..m) -> Sum(Sum(x[j]*y[k],j=1..n),k=1..m)</p>
<p>Can anybody show me an elegant way to do it?</p>
<p>Gracias</p><p>I wish to convert:</p>
<p>Sum(x[k],k=1..n)*Sum(y[k],k=1..m) -> Sum(Sum(x[j]*y[k],j=1..n),k=1..m)</p>
<p>Can anybody show me an elegant way to do it?</p>
<p>Gracias</p>203414Wed, 04 Feb 2015 22:00:11 Zchrtzstnchrtzstnstoring a value in a list/array/sequence
http://www.mapleprimes.com/questions/203327-Storing-A-Value-In-A-Listarraysequence-?ref=Feed:MaplePrimes:Tagged With convert
<p>I need to convert a base 10 int(defined as num) to its base 3 format using a while loop. I would like to store the remainder of the num%3 to a list/sequence/array in maple. Now, if I were to use a sequence, I would need a pre-defined range. How do I solve this issue?</p><p>I need to convert a base 10 int(defined as num) to its base 3 format using a while loop. I would like to store the remainder of the num%3 to a list/sequence/array in maple. Now, if I were to use a sequence, I would need a pre-defined range. How do I solve this issue?</p>203327Fri, 23 Jan 2015 01:45:24 ZGuruYerramGuruYerramCan old Maple library be converted for modern Maple?
http://www.mapleprimes.com/questions/203175-Can-Old-Maple-Library-Be-Converted-For?ref=Feed:MaplePrimes:Tagged With convert
<p>Hallo. There is a package "Standard Form" (for Maple 3 & 4): http://www.cecm.sfu.ca/~wittkopf/</p>
<p>I am interesting if it can be converted for modern Maple 18?</p>
<p> </p><p>Hallo. There is a package "Standard Form" (for Maple 3 & 4): http://www.cecm.sfu.ca/~wittkopf/</p>
<p>I am interesting if it can be converted for modern Maple 18?</p>
<p> </p>203175Wed, 31 Dec 2014 15:03:27 ZDmitry LyakhovDmitry LyakhovCan't solve system of equation with 4 unknowns.
http://www.mapleprimes.com/questions/203140-Cant-Solve-System-Of-Equation-With-4-Unknowns-?ref=Feed:MaplePrimes:Tagged With convert
<p>Hello friends;</p>
<p>I uploaded the file. Firstly i solved the 4. order ode. I converted it to trigonometric functions from exponantial.</p>
<p>I have 4 equation and 4 unkowns. I thought , it is sufficient to solve this. As you see , i can not solve the system .</p>
<p>May you help me please where i am doing wrong. </p>
<p>Thanks.<a href="/view.aspx?sf=203140_question/odev4.mw"><br></a></p>
<p><a href="/view.aspx?sf=203140_question/odev4.mw">odev4.mw</a></p>
<p>(PS:i downloaded the file again correctly)</p><p>Hello friends;</p>
<p>I uploaded the file. Firstly i solved the 4. order ode. I converted it to trigonometric functions from exponantial.</p>
<p>I have 4 equation and 4 unkowns. I thought , it is sufficient to solve this. As you see , i can not solve the system .</p>
<p>May you help me please where i am doing wrong. </p>
<p>Thanks.<a href="/view.aspx?sf=203140_question/odev4.mw"><br></a></p>
<p><a href="/view.aspx?sf=203140_question/odev4.mw">odev4.mw</a></p>
<p>(PS:i downloaded the file again correctly)</p>203140Thu, 25 Dec 2014 08:23:17 ZilkeilkeIntegral of natural logarithm finction
http://www.mapleprimes.com/questions/203091-Integral-Of-Natural-Logarithm-Finction?ref=Feed:MaplePrimes:Tagged With convert
<p>Hello everyone,</p>
<p>I'm using Maple18, I tried to integrate the function including natural logarithm:</p>
<p><img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm1.JPG" alt=""> </p>
<p>But we get the answer:</p>
<p><img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm2.JPG" alt=""></p>
<p>Is there any simple way to directly convert the answer to the kind of form we want? I cannot not finish the conversion:</p>
<p> <img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm3.JPG" alt=""></p>
<p>So the toolbox "IntegrationTools" was used, but finally, we couldn't compute the integral:</p>
<p> <img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm4.JPG" alt=""></p>
<p> However, we can get the correct answer by manually inputting the formula.</p>
<p> <img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm5.JPG" alt=""></p>
<p>Using IntegrationTools is pretty nasty and not very convenient, such as the problem I mentioned.</p>
<p>Does anyone have another solution?</p><p>Hello everyone,</p>
<p>I'm using Maple18, I tried to integrate the function including natural logarithm:</p>
<p><img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm1.JPG" alt=""> </p>
<p>But we get the answer:</p>
<p><img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm2.JPG" alt=""></p>
<p>Is there any simple way to directly convert the answer to the kind of form we want? I cannot not finish the conversion:</p>
<p> <img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm3.JPG" alt=""></p>
<p>So the toolbox "IntegrationTools" was used, but finally, we couldn't compute the integral:</p>
<p> <img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm4.JPG" alt=""></p>
<p> However, we can get the correct answer by manually inputting the formula.</p>
<p> <img src="/view.aspx?sf=203091_question/Integration_of_natural_logarithm5.JPG" alt=""></p>
<p>Using IntegrationTools is pretty nasty and not very convenient, such as the problem I mentioned.</p>
<p>Does anyone have another solution?</p>203091Wed, 17 Dec 2014 03:07:27 ZChiaChiahow to convert document in document mode to worksheet mode?
http://www.mapleprimes.com/questions/203080-How-To-Convert-Document-In-Document?ref=Feed:MaplePrimes:Tagged With convert
<p>sometimes when I download something from Maple apps centers, such as this package, <a href="http://www.maplesoft.com/applications/view.aspx?SID=33406">http://www.maplesoft.com/applications/view.aspx?SID=33406</a> I find the example documents there are written in .mw and when I open them, there are in document mode style, the fancy word like style which I can't stand looking at. It has all the math input in italic and maple commands look different from classic Maple text. It very confusing, since I see something as (0<x<1) which is valid in this document mode, but in classical maple, this is not valid code.</p>
<p> </p>
<p>It seems Maple has 2 different syntax. One that works in document mode and one that is classical text maple.</p>
<p>I like to use only input as Maple notation which these documents do not do.</p>
<p>Is there a way to convert such .mw file to become standard classic worksheet mode? I know I will lose the chapter/section heading and all that. I also tried selecting all in the document, then did Tools->options->Display->Input display->Maple notation, but nothing happend to the open document. It remained document mode with 2D math input.</p>
<p>When I save it as .mws, and open it again, it remains on document mode.</p>
<p>How to convert such documents to classical Maple syntax?</p>
<p> </p>
<p> </p><p>sometimes when I download something from Maple apps centers, such as this package, <a href="http://www.maplesoft.com/applications/view.aspx?SID=33406">http://www.maplesoft.com/applications/view.aspx?SID=33406</a> I find the example documents there are written in .mw and when I open them, there are in document mode style, the fancy word like style which I can't stand looking at. It has all the math input in italic and maple commands look different from classic Maple text. It very confusing, since I see something as (0<x<1) which is valid in this document mode, but in classical maple, this is not valid code.</p>
<p> </p>
<p>It seems Maple has 2 different syntax. One that works in document mode and one that is classical text maple.</p>
<p>I like to use only input as Maple notation which these documents do not do.</p>
<p>Is there a way to convert such .mw file to become standard classic worksheet mode? I know I will lose the chapter/section heading and all that. I also tried selecting all in the document, then did Tools->options->Display->Input display->Maple notation, but nothing happend to the open document. It remained document mode with 2D math input.</p>
<p>When I save it as .mws, and open it again, it remains on document mode.</p>
<p>How to convert such documents to classical Maple syntax?</p>
<p> </p>
<p> </p>203080Mon, 15 Dec 2014 03:56:36 ZnmnmHow to change the slew rate unit to V/us
http://www.mapleprimes.com/questions/203011-How-To-Change-The-Slew-Rate-Unit-To-Vus?ref=Feed:MaplePrimes:Tagged With convert
<p>I have been having trouble converting the default slew rate unit from Unit('m'^2*'kg'/('s'^4*'A'))</p>
<p>to V/us (Volts per microsecond)</p>
<p> </p>
<p>I trying to get to a point where I can define the slew rate and the result will be in terms of V/us.</p>
<p> </p>
<p>Similarly, how can I change the output result from 1/s to Hz?</p><p>I have been having trouble converting the default slew rate unit from Unit('m'^2*'kg'/('s'^4*'A'))</p>
<p>to V/us (Volts per microsecond)</p>
<p> </p>
<p>I trying to get to a point where I can define the slew rate and the result will be in terms of V/us.</p>
<p> </p>
<p>Similarly, how can I change the output result from 1/s to Hz?</p>203011Sat, 06 Dec 2014 01:09:01 Zkle8309kle8309Why create rtable, apply algorithm, then convert to Matrix, instead of using Matrix from start?
http://www.mapleprimes.com/questions/202987-Why-Create-Rtable-Apply-Algorithm?ref=Feed:MaplePrimes:Tagged With convert
<p>I noticed this in Student:-NumericalAnalysis:-Romberg, here are the lines of interest:<br><br>The question is: Why create rtable, apply algorithm, then convert to Matrix at end? Why not replace line 4 below with Matrix command from start? Could not the same thing be done using Matrix from the start?</p>
<p>-----------------------------------------<br>proc(expr, var, a, b, n)<br>local f, R, j, k, i, oldDigits;<br> 4 R := rtable(1 .. n,1 .. n,('storage') = ('triangular')['lower']); #Why not create Matrix here?<br> 6 R[1,1] := evalf(1/2*(b-a)*(f(a)+f(b)));<br> 7 for k from 2 to n do<br> 8 R[k,1] := 1/2*evalf(R[k-1,1]+(b-a)/(2^(k-2))*add(f(a+(2*i-1)*(b-a)/(2^(k-1))),i = 1 .. 2^(k-2)))<br> end do;<br> 10 for j from 2 to n do<br> 11 for k from j to n do<br> 12 R[k,j] := evalf(4^(j-1)*R[k,j-1]-R[k-1,j-1])/(4^(j-1)-1)<br> end do<br> end do;<br> 13 R := evalf[oldDigits](R);<br> 14 return convert(R,Matrix,('shape') = ('triangular')['lower']) #Why not use Matrix from the start?<br>end proc<br>------------------------------------------<br><br>Maple 18.02</p><p>I noticed this in Student:-NumericalAnalysis:-Romberg, here are the lines of interest:<br /><br />The question is: Why create rtable, apply algorithm, then convert to Matrix at end? Why not replace line 4 below with Matrix command from start? Could not the same thing be done using Matrix from the start?</p>
<p>-----------------------------------------<br />proc(expr, var, a, b, n)<br />local f, R, j, k, i, oldDigits;<br /> 4 R := rtable(1 .. n,1 .. n,('storage') = ('triangular')['lower']); #Why not create Matrix here?<br /> 6 R[1,1] := evalf(1/2*(b-a)*(f(a)+f(b)));<br /> 7 for k from 2 to n do<br /> 8 R[k,1] := 1/2*evalf(R[k-1,1]+(b-a)/(2^(k-2))*add(f(a+(2*i-1)*(b-a)/(2^(k-1))),i = 1 .. 2^(k-2)))<br /> end do;<br /> 10 for j from 2 to n do<br /> 11 for k from j to n do<br /> 12 R[k,j] := evalf(4^(j-1)*R[k,j-1]-R[k-1,j-1])/(4^(j-1)-1)<br /> end do<br /> end do;<br /> 13 R := evalf[oldDigits](R);<br /> 14 return convert(R,Matrix,('shape') = ('triangular')['lower']) #Why not use Matrix from the start?<br />end proc<br />------------------------------------------<br /><br />Maple 18.02</p>202987Tue, 02 Dec 2014 00:09:28 ZnmnmInverse of convert/base
http://www.mapleprimes.com/questions/202919-Inverse-Of-Convertbase?ref=Feed:MaplePrimes:Tagged With convert
<p>Dear friends:</p>
<p>If</p>
<p>n:=197</p>
<p>then</p>
<p>d:=convert(n,base,10) --> returns [7,9,1]</p>
<p>Is there a simple way for getting back n from d, i.e., 197 from [7,9,1] , not using a for loop?</p>
<p>Thanks and best regards</p>
<p>César Lozaada</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p><p>Dear friends:</p>
<p>If</p>
<p>n:=197</p>
<p>then</p>
<p>d:=convert(n,base,10) --> returns [7,9,1]</p>
<p>Is there a simple way for getting back n from d, i.e., 197 from [7,9,1] , not using a for loop?</p>
<p>Thanks and best regards</p>
<p>César Lozaada</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>202919Sun, 23 Nov 2014 01:16:16 Zcloz54cloz54convert convolution integral to series
http://www.mapleprimes.com/questions/202910-Convert-Convolution-Integral-To-Series?ref=Feed:MaplePrimes:Tagged With convert
<p>hi everyone , i need your point of view in my question,any help would be appreciated in advance .</p>
<p>we have a discrete function named g(t) and a continous function f(t) in in convolution integral just like this :<br>int(f(t-x)*g(x),x=0..t) ; <br>we have just g(x) in some special points int the interval (0..t) , thus i need to convert this integral to a series.<br>how should i do this ? can anyone help or any idea ? i need at first a mathematical solution or idea about how to do this and then, how to do this in a software ?<br>tnx again.</p><p>hi everyone , i need your point of view in my question,any help would be appreciated in advance .</p>
<p>we have a discrete function named g(t) and a continous function f(t) in in convolution integral just like this :<br />int(f(t-x)*g(x),x=0..t) ; <br />we have just g(x) in some special points int the interval (0..t) , thus i need to convert this integral to a series.<br />how should i do this ? can anyone help or any idea ? i need at first a mathematical solution or idea about how to do this and then, how to do this in a software ?<br />tnx again.</p>202910Sat, 22 Nov 2014 10:23:08 Zmehdi jafarimehdi jafariconvert second order ode to first order ode....
http://www.mapleprimes.com/questions/202722-Convert-Second-Order-Ode-To-First-Order-Ode?ref=Feed:MaplePrimes:Tagged With convert
<p>Hi every body:</p>
<p>i have a second order ode and will convert to two ode of first order with maple,how do this work???</p>
<p>eq := diff(y(x), x, x)+2*y(x)+y(x)^2 = 0</p><p>Hi every body:</p>
<p>i have a second order ode and will convert to two ode of first order with maple,how do this work???</p>
<p>eq := diff(y(x), x, x)+2*y(x)+y(x)^2 = 0</p>202722Thu, 30 Oct 2014 08:46:50 Zmehran rajabimehran rajabiMatlab to maple
http://www.mapleprimes.com/questions/202717-Matlab-To-Maple?ref=Feed:MaplePrimes:Tagged With convert
<p>Hi! I have a matlab worksheet that i need to convert it to Maplesoft. Is it possible?</p>
<p>Regards</p>
<p>Hikmat</p><p>Hi! I have a matlab worksheet that i need to convert it to Maplesoft. Is it possible?</p>
<p>Regards</p>
<p>Hikmat</p>202717Wed, 29 Oct 2014 16:03:31 Zhikkihikki