Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 363 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Harry Garst 

Never use the with command inside a procedure. If you must use anything, use uses instead. See my reformulation of your code below for an example of uses.

Your posted code doesn't appear to use StringTools, but I assume that you've only posted a small portion of the overall code. If you do plan on doing with(StringTools) at some point, then you'll need to change the procedure name Generate.

While it's perfectly fine to map (or ~) an undefined symbol over a Matrix, I have a feeling that you expect int8 to actually do something; yet it's undefined. Do you mean to truncate the entries to 8-bit integers? 8-byte integers?

Pick a coding style (including an indentation style) and use it! You don't have to follow my style (below), but you should have a style.

What exactly do you mean by "did not work"?

restart;

MultivariateNormalSample:= proc(Sigma, V, N)
uses LA= LinearAlgebra, AT= ArrayTools, S= Statistics;
local d:= LA:-Dimension(V);
     LA:-LUDecomposition(Matrix(Sigma, datatype= float[8]), 'method'= 'Cholesky') .
     AT:-Alias(S:-Sample(Normal(0,1), d*N), [d,N]) +
     AT:-Replicate(Vector[column](V, datatype= float[8]), 1, N)
end proc:

 
Generate:= proc()
local S;
     S:= MultivariateNormalSample(< 1,2 ; 2,5 >, <2,3>, 100);
     map(int8, map(round, S));
end proc:


W:= Generate();

 

Here's something that would help, that I've suggested before, and that wouldn't place the slightest extra burden on legitimate new members: When any item posted by someone with zero reputation is deleted by someone other than the poster, the poster's account should be blocked. This would help because a lot of spam comes from repeat offenders.

I've deleted many hundreds (probably thousands) of Posts, Questions, Answers, Replies, and Comments in my three years here. Here's some guessed-at statistics to help understand why the above would help:

  • 100% of spam comes from users with zero reputation.
  • 98% of spam is in the form of Posts and Questions (about evenly divided) rather than Answers, Replies, and Comments.
  • I've never deleted a non-spam Post or Question from a user with zero reputation.
  • 99% of spam is immediately recognizable as spam.
  • 1% of spam seems to be mathematically related.
  • 0.1% of spam comes in the form of Question-Answer pairs where the Answer logically follows the narrative of the Question.

An alternative to what I suggested in the first paragraph would be a "Delete as Spam" button added to the pull-down list that includes Delete. This would delete the item and block the user if and only if the user has zero reputation. That way there would be very little chance of doing damage by accidentally using the button. Like I said, 100% of spam comes from users with zero reputation.

The current "Mark as Spam" button is probably worthless. I have no idea how often it is used, but I'd guess not much. How about replacing it with the "Delete as Spam" button as described in the previous paragraph?

(By "spam", I strictly mean inappropriate advertising of products and services. The definition of the term seems to have enlarged in recent years to include other forms of inappropriate posting such as repetitive, abusive, or nonsensical posting. I don't include any of these latter forms in my usage of the term.)

@al-faraj What you call "crazy" is the correct answer. Why do you doubt it? Plot it, and you'll see.

@Christopher2222 

Please delete it. I delete about a dozen pieces every night. (Most of it seems to come during my night.)

@Preben Alsholm Thanks, yes, I just noticed that myself. My suspicion was aroused because the original dsolve commands executed much too quickly.

@Mac Dude You wrote:

the order in which the code is arranged is important... I actually thought about that but decided that it should not be that way, assuming that Maple is using some kind of two-pass system when parsing the code.

The two-pass parsing is impossible because the code of the inner procedure may depend on computations done in the outer procedure. The code of inner procedure may have been changed by a subs command.

@smith_alpha 

Where have you found documentation on an APPEND option to FileTools:-Text:-WriteFile? There is no such option. A quick look at the procedure's code with showstat will confirm that. If you include an option in square brackets between a procedure's name and its arguments, the stuff in square brackets will be ignored unless the procedure is specifically coded to look for it. So, your APPEND is just being ignored. I certainly agree that the procedure should operate in append mode, but sadly it doesn't.

To the Maple designers: It's ridiculous that this command doesn't operate in append mode by default. What's the most common use scenario? Answer: The user wants to open a file, add one line to the end, and close the file. Who wants to create a file with just one line? Answer: That's not a very common operation.

Applying a function f to a square matrix A is done by performing an eigenvalue decomposition A = PDP^(-1) (where D is the diagonal matrix of eigenvalue) and then setting f(A):= P.f~(D).P^(-1). If there were two matrices, there would be no well-defined way to pair the eigenvalues.

If you could compute a multivariate Taylor series for BesselY(x,y), then the matrices could be put into a trucated series for numeric approximation. But I don't know how to compute that series.

@tomleslie 

The only syntax error that I found was the lack of quotes on union. What were the "several"?

@gkokovidis 

For one thing, I see no evidence in the original Question of missing multiplication signs or their equivalent in 2-D input. For another thing, I entered the integral in 1-D input (with explicit multiplication signs, of course), and my computer crashed utterly and completely after several minutes. There was no loss-of-kernel message and no access to Ctrl-Alt-Del---I had to turn it off with the power switch. This is Maple 18.2-64 under Window 8.1.

@Kitonum 

The distinction is not between Ctrl+l (lowercase L) and Ctrl+L but rather between Ctrl+L (which works) and Ctrl+Shift+L (which doesn't work). For example, if Caps Lock in on, then Ctrl+L still works and Ctrl+Shift+L still doesn't work. This same distinction could be made for any Ctrl+letter combination, and it is long-standing tradition, not just in Maple, that the letter be capitalized when referring to any such combination.

The above applies to Windows. I'm not sure about the other OS's. But the part about the long-standing notational tradition is much older than Windows. It goes back at least as far as 1978, which is when I started using computers.

@Markiyan Hirnyk 

Glad to know it. Joe's one of the best writers on here. I hope to see more of his work soon. I added an attribution.

@Christopher2222  FWIW, I do remember the post and animation.

@farzane 

I can't provide any more help unless you can address the issue that I raised. Specifically, in order to get a 2D plot, I need to eliminate another variable. The primary way to do that would be to have one more equation.

Also, what do you mean by the "rate" of x? Do you mean a derivative?

@tomleslie The OP is asking whether the fonts, colors, orientation, lighting, transparency, etc. can be or should be changed in order to publish the plot on paper.

To the OP: You should read the help pages ?plot,options and ?plot3d,options to get an idea of the options that are available for plots.

First 459 460 461 462 463 464 465 Last Page 461 of 709