Joe Riel

9660 Reputation

23 Badges

20 years, 9 days

MaplePrimes Activity


These are replies submitted by Joe Riel

@Robert Israel Thanks for the correction and explanation.  I suppose it is a feature, if a bit obtuse.  I stick with 1D input because its operation is much simpler to comprehend. Admittedly there are cases where fluency in 2D input is useful.

Just a comment on generating the alphabet.  If strings are okay, an easier way is

[seq("a".."z")]:

If names are required, you can use cat

[cat(``, "a".."z")]

Just a comment on generating the alphabet.  If strings are okay, an easier way is

[seq("a".."z")]:

If names are required, you can use cat

[cat(``, "a".."z")]

@Wang Gaoteng Any expressions passed in a list via dsolveargs are extracted and passed to ?dsolve, which is what generates the code for integrating the system equations.  In this case, maxfun=0 tells dsolve to ignore the maxfun limit (which limits the number of times an external routine can be called). See ?dsolve[maxfun] for details.

@Wang Gaoteng Any expressions passed in a list via dsolveargs are extracted and passed to ?dsolve, which is what generates the code for integrating the system equations.  In this case, maxfun=0 tells dsolve to ignore the maxfun limit (which limits the number of times an external routine can be called). See ?dsolve[maxfun] for details.

What sort of state-machine do you want to implement?

Could you post (or email me) the MapleSim model?  I'm not clear on what the pulley system is supposed to represent. A brief description of that would be helpful.

You can tell Matrix to scan by columns (see ?scan) instead of rows, which then generates the transpose:

Matrix( [ seq([n, n^2], n = {1, 2, 3, 50, 100, 1000})], 'scan=columns');

Note that with any of these methods, using a set to generate the base data may not be the best choice.  The row/column order depends on the set order.  For a set consisting of immediate integers that is the usual order, however, that may not be the case for large integers.

You can tell Matrix to scan by columns (see ?scan) instead of rows, which then generates the transpose:

Matrix( [ seq([n, n^2], n = {1, 2, 3, 50, 100, 1000})], 'scan=columns');

Note that with any of these methods, using a set to generate the base data may not be the best choice.  The row/column order depends on the set order.  For a set consisting of immediate integers that is the usual order, however, that may not be the case for large integers.

@hirnyk Good point.  Also tricky is

1/sqrt(1+x)

@hirnyk Good point.  Also tricky is

1/sqrt(1+x)

@acer Thank you for the explanation.  I was vaguely aware of Maple's ability to do this (automatically assign libname to read subdirectories under $HOME/maple/toolbox), but because I had customized my installation it wasn't working.  However, I just straightened that out.  Will probably have to clean up a number of scripts I have lying around, but this seems the right way to go.  I've since modified the Makefile (both in the zip file and in the write-up) to install (no soft links) the generated Maple archive and shared binaries under $HOME/maple/toolbox/ListToolBox.

I agree that this functionality of Maple should be clearly explained. 

@acer Interestingly, the range changes with the parity of the number of dots.

(with 2D input):

(**) seq(0..1, .1);
      0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
(**) seq(0...1, .1);
                             0, 0.1
(**) seq(0....1, .1);
      0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
(**) seq(0.....1, .1);
                             0, 0.1



Congratulations.  I always learn from Robert's posts. 

@herclau The reason is the presence of the empty function in the term on the right.  The empty function is the function with the empty name, that is, ``.   Note that any inert name could have been used, it is a hack to force Maple to keep the the term together.  The reason for using the empty function is that the complete term looks like the fraction that you want.  Also, the ?expand commands converts ``(x) to x, which is convenient.

First 81 82 83 84 85 86 87 Last Page 83 of 195