MaplePrimes Questions

I have a function which calculates a number for [x,y] inside a matrix, which depends on the values surrounding said initial cell (from [x-1,y-1] yo [x+1,y+1]). However, for the values on the border, the idea is to go around to the opposite side, creating a Torus of the sort.
The solution I seemed to have found was to create 4 indices: 2 controled with 'for' and 2 which were modified accordingly to be used as imputs for the function:

x:=x0;y:=y0;
for r from x-1 to x+1 do
    print("r",r);
    for t from y-1 to y+1 do
        print("t",t);
        if r=0 then i:=N; else i:=r; fi;
        if t=0 then j:=N; else j:=t; fi;
        if r=N+1 then i:=1; else i:=r; fi;
        if t=N+1 then j:=1; else j:=t; fi;
        print("i",i);print("j",j);
        function(i,j);
od; od;
 

(the print commands are for the tests I have been running so see where the potential error lied).
If you run this script, you can clearly see for x0,y0<>1 that it works perfectly, even for x0,y0=N where it succesfully goes around and changes to 1. However, for x0,y0=1 it isn't able to detect that r&t=0 and so it doesn't change it to N; creating an error where it tries to find the value 0 of an Array.

Thanks in advance,
Enrique

how to read a jpg picture and draw mesh on it?

mesh generator in maple

how to get all points and lines from this mesh on jpeg picture?

How can i answer iv on Maple?

The problem I am trying to solve requires a significant amount of computation time. I am unaware if a solution to the problem exists. If a solution does exist, I only need one solution, not the set of every possible solution. Is there a way to restrict the solve function such that when (if) one solution is found, the computation halts and the solution is outputted?

I can't seem to plot the second derivative graph for f'' versus y. Is it possible to use the fdiff command twice in a line?

Open to all opinions. Any help would be greatly appreciated :)

fyp3.mw

Hi

I have a set of differential equations which I have solved for a specific value, and would like to use the second answer (F__A(V)) in my next calculations

 

What command can I use to retrieve that value?

sol(0.1e-4);
     [V = 0.00001, F__A(V) = HFloat(3.498873118476744e-6), 

       F__B(V) = HFloat(1.9101126881523255e-5), 

       F__C(V) = HFloat(9.550563440761627e-6)]
 

Regards

how to define VertexWeight in Graph Theory package

I have tried to do it by the following command "File/Modelica/Import Modelica Library" in MapleSim GUI. An error appears saying "Modelica is a reserved name".

I think you can also reproduce it by downloading the Modelica library from the following web site: "https://www.modelica.org/libraries". And then importing it in the usual way by openning the package.mo file at the root directory.

I think I am missing something here, so any advise/information/minimal commentary would be greatly appreciated.

Cheers, Ovle

Hello!

I am working in a simulation, which requires me to create a checkerboard of values which I paint afterwards according to its value. The idea is to create a sequence of images (which I could export for every iteration and create into a gif/timelapse afterwards). The problem I am encountering is that when I try to plot it, I only obtain a difuse coloring scheme, without having a specific color for every pixel.

if you search for the color command in plots (http://www.maplesoft.com/support/help/Maple/view.aspx?path=plot/color) one of the examples is more or less the result I want, but I would like to have it without the gridlines and being able to control the color according to the value of the matrix in said position.

 

My current attempt, and the one closest to the solution is:

 

R:=Matrix(1..N,1..N, datatype=integer); for x from 1 to N do for y from 1 to N do R[x,y]:=P[x,y,2]*18+P[x,y,3]: od: od:R;
#P is the matrix where I do the calculations and R is the matrix I want to plot after every step of the calculation.

surfdata(Matrix(R), 1..N, 1..N, style=surface,
         dimension=2, labels=["x", "y"],
         gridsize=[100,100],
         colorscheme=["zgradient",
                      ["Indigo","Blue","Cyan","Green","Yellow","Orange","Red"]]);
#the surfdata I resqued from another proyect I had. I know it is not thought for this tipe of grafs, but it was the closest I could come by.

 

I do not know if it is a better idea to use an Array or a Matrix to plot this. While the P array isn''t touched, I do not mind modifying in any way the R matrix

Thank you,

Enrique
 

after solve a set of equations, i got a set of solutions, [A,B,C], if i remove one of solution [C]

is it possible to find this removed solution from solutions set [A,B]

how to check the dependency of groebner basis or a set of polynomials?

emal := proc(zipeq,abc1param,abc2param,abc3param,abc4param,abc5param)
source1 := Prefix(zipeq);
print(source1);
source2 := subs(s=abc5param,subs(v=abc4param,subs(u=abc3param,subs(t=abc2param,subs(a=abc1param,source1))))):
print(source2);
zipplus := proc(mm, pp)
 return zip((x,y) -> x+y, mm, pp)
end proc:
zipstar := proc(mm, pp)
 return zip((x,y) -> x*y, mm, pp)
end proc:
return eval(source2);
end proc:
 

would like to do the Prefix first and then eval the prefix later but do not expect do define zipstar and zippplus in global

just want to eval this Prefix which is formula of zipstar and zipplus function

 

above result same as print(source2), but eval in return , it have not evaluate, why?

A family of curves has polar equation r=cos^n (theta/n), 0<=theta,n*pi, where n is a positive even integer.

Previously Using t = theta as the parameter and finding  a parametric form of the equation of the family of curves it was shown that 

dy/dx = (sin(t)sin(t/n)-cos(t)cos(t/n)) /( sin(t)cos(t/n)+cos(t)sin(t/n)).

Is it possible to show on Maple with a program that there are n+1 points where the tangent to the curve is paralell to the y axis?

eqn := (A/(1+a*exp(-b*(((atan(h/R))*(180/Pi))-a)))) +10*log10(h^2+R^2)+20*log10(f)+20*log10(4*Pi/c)+nNLOS = 110;

R and h are my unknown variables in the equation

The rest of variables, A,c,f,a,b,NLOS are known.

I need to find solution such that derivate of R w.r.t h = 0, I want to maximize R.
But this equation is implicit, R cannot be separated on one side of the equation. I tried:


> implicitdiff(eq, R, h);


But I get the error:

Warning, solutions may have been lost
 

A family of curves has polar equation r=cos^n (theta/n), 0<=theta,n*pi, where n is a positive even integer.

Using t = theta as the parameter, find a parametric form of the equation of the family of curves and show that 

dy/dx = (sin(t)sin(t/n)-cos(t)cos(t/n)) /( sin(t)cos(t/n)+cos(t)sin(t/n))

on maple i tried

x:=((cos(t/n))^n)*cos(t):

y:=((cos(t/n))^n)*sin(t):

w:=diff(x,t)

z:=diff(y,t)

z/w

and i never got the above answer so i did

simplify(z/w)

and still never got the answer instead i got 

(cos(t/n)*sin(t/n)-sin(t)*cos(t))/(cos(t/n)^2-cos(t)^2)

 

 

 

 

First 817 818 819 820 821 822 823 Last Page 819 of 2237