MaplePrimes Questions

Hello. I have a question. If you can help me, i am pleasure.

Have nice day. :)

 

Question: Enter a number after maple find(understand) to prime number or normal number.

 

restart;
> asal := proc(n)
> local m;
> if n<2 then
> m := s=n/2+1;
> print(m);
> else
> for i from 2 to n do
> if irem(n,i,0) then
> print("asal değil");
> if i = m then
> print("asaldir");
> end do;
> end if;
> end if;
> end proc;

 

Consider the following code, which just generates two "identical" matrices, differing only in their requested storage type, and then does some simple manipulations.

restart;
#
# Define matrix using sparse storage
#
   testM:= Matrix( 40,40,
                           (i,j)->`if`(j>=i,1,0),fill=0,
                           storage=sparse
                        ):
#
# Define identical(?) matrix with rectangular storage
#
   nm:= Matrix( 40,40,
                        testM,
                        storage=rectangular
                     ):
#
# Define procedure to return some matrix properties
#
   matData:= proc( myMat::Matrix)
                            return op(3, myMat)[2], # check storage type
                                      myMat[5, 1..-1], # get 5-th row
                                      add(myMat[5, 1..-1]); # add elements in 5-th row
                    end proc:
#
# Get properies of the two matrices - should be identical
# but check result of adding elements in the 5-th row
#
    matData(testM);
    matData(nm);

The matData procedure ought to produce the same results for the two matrices, with the exception of the storrage type. But the 'add()' command does not. The 'myMat[5, 1..-1]' command produces the same vector, the 5-th row - but stick an add() wrapper around it and all hell breaks loose.

Is this a bug or am I missing something?

Suggestions such as avoiding sparse data storage are not really acceptable: the above is a much simplified version of my original problem where I was using graph theory to play with a "cost function" and (with G a graph) the command,

WeightMatrix(MinimalSpanningTree(G))

returned a sparse-storage matrix - and I didn't notice. There appears to be no option on the WeightMatrix() command to control the storage tyoe of the returned matrix. Result was that all subsequent code based on slicing/dicing/and particularly 'add()ing' sub-blocks of this weight matrix fell apart

Don't get me wrong: I can sort of accept that the weight matrix of minimal spanning tree would (hopefully) be mainly zeros so sparse-storage might be a good default option but I don't see why the results of a command such as

add(myMat[5, 1..-1])

should vary depending on the internal storage used for the matrix, particularly when I have no control over the storage type being adopted

 

How to find the maximum natural number n s. t. the sum of its cubed digits is greater than or equal to n? Of course, with Maple. The same question for the sum of the  digits to k-th power. Here are my unsuccessful attempts:
1.Optimization:-Maximize(n, {n <= convert(map(c ->c^3, convert(n, base, 10)), `+`)}, assume = integer);

Error, invalid input: `convert/base` expects its 1st argument, n, to be of type {integer, list(integer)}, but received n


2. for n while n <= convert(map(c ->c^3, convert(n, base, 10)), `+`) do print(n) end do;

                               1
                               2
                               3
                               4
                               5
                               6
                               7
                               8
                               9

I am facing a problem in maple 17. When I am launching maple 17, each time  the evaluating process is automatic started in server 1 without any input. I could not interrupt this evaluating process. For removing this problem I reinstall maple 17, but the problem is exist.  Please inform me soon how remove this problem ?

Maple responds with FALSE, but for which real number is the statement false?

restart; assume(x, 'real');

verify(abs(x), sqrt(x^2), {'equal'});

 

kind regards,

Harry Garst

Hello,

I'm very interested by this function so as to export my code Maple as MATHML thanks to the function ExportContent.

However, this function can be applied only to a expression.

I would like to apply to all the code of my worksheet.

Do you have some ides to apply ExportContent or equivalent to obtain the MATHML transformation of a whole worksheet ?

Thanks a lot for your help.

Best regards,

Hello,

I need to prepare for a final exam for a introdutory computer science course in Maple.
My professor gives us mutliple choice questions, short answer questions and wiritng some codes.

what is the most efficient way to study for my final exam? or how should i study for an computer science exam. I am not really use to preparing for such a course. 

Are there any websites that i can practice multiple choice questions?

I would appreciate any advice.

 

Thank you very much.

Dear friend! Hope you will be fine, I want to general matrix for m by m order. The file attached. I am waiting kind response.

Help.mw

PhD (Scholar)
Department of Mathematics

 

solve 30a+75b+110c+85d+255e+160f+15g+12h+120i=8000 over the positive integers

can I extract a certain non numeric degree from an expression?

for example, I want to get degree "n-1" from "x^(n-1)+y".

 

any thoughts? 

 

Hi all,

Please help me to complete my plot. I want to insert colormap in the following figure...


``

``

plot3d([r, theta, 1.1679+1.245834194*r^2-7.929880866*r^4+16.16658823*r^6], r = 0 .. 1, theta = 0 .. 2*Pi, coords = cylindrical);

 

``


Download plot.mw

Hi

I have 2 sets of data and I need to plot them as histograms on the same axis(superimposed). Is it possible to do it using Maple 12? Right now I only know how to plot them in different axis.

 

Thanks

Hi is there a way to identify curves in your plot? Especially when you dont know it yourself?

 

For example, I have 10 polynomials all order 5 and up, whilst I can trial and error identify which one is which it is very inefficient.

I used to use Mathematica, and I could manually label the curves with color which allows to see which curve is which. I assume there is something of the sort for Maple?

I know this has been asked a lot, but I just want to know if there is a way to ask Maple to only show like maybe the first 1000 results instead of the whole 100000+ results? That way I don't need to overload Maple.

First 1273 1274 1275 1276 1277 1278 1279 Last Page 1275 of 2430