tomleslie

13876 Reputation

20 Badges

15 years, 174 days

MaplePrimes Activity


These are replies submitted by tomleslie

since you do not provide the equation, or the number of variables, but you might want to consider the different outputs produced by the following toy example

solve(x^4-1, {x}); #four solutions
solve({x^4-1 ,x>0}, {x}); #one solution
solve(x^4-1,{x}, useassumptions) assuming x>0; #one solution

and read the solve/details help page - particularly the part on using assumptions.

Note that without the 'useassumptions' option, solve() will generally ignore any assumptions. There are also restrictions on the type of assumptions which can be used

restart;
a:=1235:b:=751:p:=1601:ans:=1323:
printf("The solution to %d^x = ( %d mod %d ) is x=%d", a, b, p, ans);

will solve all of your problems except being able to produce superscript notation: no variation of print(), printf(), lprint() will produce a superscript.

On the other hand

restart;
a:=1235:b:=751:p:=1601:ans:=1323:
with(InertForm):
Typeset(Parse("a^x"), inert=false);

will produce a "superscripted" expression :-)

Unfortunately I have been unable to combine the output of this command with simple text (or a string), to generate the "sentence" you require - and it's past my bedtime :-(

 

  1. Your expression has two variables, 'R' and 't', so you can plot the function value in 3-dimensions with 'R' on one axis, 't' on the second axis, and the function value on the third axis: I have no idea whether this is what you mean by plotting the 'radial solution "U" in n-sphere of radius "R" ', becuase htis latter phrase means nothing to me. In fact since 'R' is a variable, there is no such thing as a "sphere of radius R" - there are as many spheres as there are values of the variable 'R'
  2. the expression to be plotted contains the term (-t)^p, where p evaluates to -6/5. For 't' in the range [0..1] the result of this expression is complex unless you are very careful about order of evaluation. For example, since t=0..1, let us pick a value of 0.5, so you wish to compute (-0.5)^(-6/5). If you try this in Maple you will find that it evaluates to a complex number. On the other hand ((-0.5)^(-6))^(1/5) evaluates to a real number.......

Using the fourier transfom, you have produce a spectrum which clearly shows

  1. The time-domain data has an offset (hence the siginificant spectral term at f=0)
  2. A "fundamental" at around 0.11Hz
  3. A second harmonic at around 0.22Hz
  4. Quite a lot of truncation noise - which, given the windowing on your time-domain data is not too surprising

So far, so good: output is roughly what I would expect from input. However your statement

"I would like to change the frequency scale along the x axis into a period scale"

puzzles me. The horizontal axis is a measure of frequency: a "period" is the repeating unit of one specific frequency: so I do not know what you mean by  "a period scale" - period of what exactly?

The only thing that makes much sense (and helps with harmonic analysis) is if the "fundamental tone" in your spectrum is scaled to occur at a frequency of 1, and then any harmonics woud occur at 2, 3 etc corresponding to 2nd harmonic, third harmonic and so on.

There is a good chance that I am completely wrong with this guess about wnat you want. However the attached contains an execution group which scales frequency so that your fundamental tone occurs at 1, and makes it clear that there is also significant energy at 2 (ie second harmonic)

spectrum.mw

NB the above attached is pretty rough, but I am reluctant to "bulletproof" it, because it may be irrelevant to what you actually want.

If it bears no resemblance to what you wnat then you will have to clarify

The tensor[Einstein]() command returns a tensor which is a specific datatype within Maple. Most of the commands in the tensor() package are designed to create/manipulate tensors.

If your subsequent work requires manipulation of this tensor then I suggest you leave it as a tensor and use commands from the tensor package.

If you really (really) want to get at the building blocks of a tensor, then all you have to do is realise that the tensor datatype consists of a  table, which has two entries. These entries can be accessed by using the indices for the table which are 'index_char' and 'compts'

So if your original command

Estn := Einstein(metric, RICCI, RS);

works, then

Estn[index_char];

will return the list of covariant/contravariant indices. Similarly

Estn[compts];

will return the Array representing the components of the tensor. Hence if you really, really want this Array as a matrix, then

convert(Estn[compts], matrix)

ought to work.

Or, if this is the only part of the tensor you will ever want, then

convert(Einstein(metric, RICCI, RS)[compts], matrix)

will return it directly

@Carl Love 

I too can see it if I use Chrome

@panke 

Well, despite my request, you can't/won't define what you are using as 'metric'

You claim that "The result that I get is file list". There is no such thing in Maple as a "file list"

As far as I can tell from Maple help

Estn := Einstein( g, RICCI, RS );

will return a table (assuming 'g' is appropriately defined). Try looking at the examples on the tensor[Einstein] help page

So I still do not understand your problem.

J := int(arctan(x)*ln(1+1/x^2), x = 0 .. infinity);
IntegrationTools:-Parts(J, ln(1+1/x^2));

works in both Maple2015 and Maple2016 - were you expecting Maple 2016 to produce an answer without the 'Parts' suggestion - or what?

I don't go back as far as Maple13 , but if I tr to execute your code

with(tensor)
Estn := Einstein(metric, RICCI, RS);
displayGR(Einstein, Estn);

then I immediately get a error message stating that

type/tensor_type` : "metric" is not a table.
Error, invalid input: Einstein expects its 1st argument, g, to be of type tensor_type, but received metric

Before I can do any more, I think you are going to have to produce a valid expression for the quantity 'metric'

@Carl Love 

You (and the OP) can obviously 'see' a picture (or a reference to a picture) which I can't.

Do I have some kind of obscure browser problem?

BTW My default browser is Firefox running on Win7, 64-bit

Based on my original suggestion of using ListTools[Search]. This will be less efficient than Carl's, because it finds all possible matche, then selects the first. However for your 'toy' example, it will deliver the same answer as Carl's, and I very much doubt if you will notice the execution time difference

restart;
A:=[5,10,15,20,25,30,35,40,45,50]:
B:=[7,14,21,28,35,42]:
with(ListTools):
mat:= [ seq( `if`( Search(B[j], A) > 0,
                           [ j, Search(B[j], A) ],
                            NULL
                        ),
                    j=1..numelems(B)
                 )
         ][1];

 

se it find all posibl macthes

On win7, 64-bit

Agree that the 'odd' character in the output seems to be the ':=' sign which is being "overwritten"

Long expressions *seem* to wrap: toy example  - extending OP's original function definition to

V:=(m,n)->binomial(m-floor(1/2*(n+1)),m-n)
          +
          binomial(m-floor(1/2*(n+2)),m-n)
          +
          binomial(m-floor(1/2*(n+3)),m-n)
          +
          binomial(m-floor(1/2*(n+4)),m-n)
          +
          binomial(m-floor(1/2*(n+5)),m-n);

the output "wraps", and there is no problem with the ':=' in the output

However the final integer fraction does not "wrap" in either OP's example or yours.

Since some expressions are "wrapping" and some aren't, I doubt if this is a simple interface setting - I couldn't find anything controlling wrap/don'tWrap in any case

This one could get annoying!

 

I really have no idea what you are trying to do and you seem incapable of explaining.

However you cannot copy/paste between Excel and Maple.

If you wish to get data from Excel to Maple, you will have to use the Maple command ExcelTools[Import]() - see the relevant help page

If you type mverbatim in the MaplePrimes search field you will see that this problem has cropped up a couple of times before, and answers have been suggested. If none of these work, let us know which tutotial you are running, in which Maple version and I'm sure someone here will investigate fiurther

Well have you tried

ImportMatrix(fileNameWheretheMatrixIsStored, source=MATLAB)

If that doesn't work, you are probably going to have to upload the file containing the matrix, in order than someone here can investigate further

First 156 157 158 159 160 161 162 Last Page 158 of 207