Items tagged with set set Tagged Items Feed

Dear all,

Please help in this question.

 

Using   I want to plot in R^3, the set of point u[i,j]^k . This point has as cordinate  (x[i],y[j],t[k]).

x := i -> (1/5)*i;  #  x[i] the x-coordinate
y := j -> (1/5)*j; # y[j] the y-coordinate
t := k -> (1/5)*k;  #  t[k] the t-coordinate

The name of point is u[i,j]^k

How can I  plot all the point.


 with(geom3d):

point(u[i,j]^k, x(i),y(j),t(k));

 

Thank you.

 

 

Is it possible to set maple to fill in a header or footer for every new document I make?

Now i have to do it fot each new file by hand: 

View => Header footer ..=> 

 - select custom  - goto tab cusom headers put in the left textfield "&[File] pag. &[Page]/&[Pages]"

hi all.
i have a system of ODE's including 9 set of coupled OED's . 

i have  converted second deravaties to dd2 , in other words : diff(a[i](t),t,t)=dd2[i](t) . i =1..9 :

and i have set these 9 equations in form of vibrational equations such :  (M.V22)[i]+(K(t).V(t))[i]+P(t)[i] = eq[i] , where M is coefficient Matrix of second  derivatives , V22 is Vector of second derivaties , for example V22[1] = diff(a[1](t),t,t) , and  P(t) is the numeric part of equations ( they are pure number and do not contain any symbolic function ) and K(t).V(t) is the remaining part of equations such that : (K(t).V(t))[i] = eq[i] - (M.V22)[i] - P(t)[i]  , and V(t) are vector of a[i](t)'s which V(t)[1] = a[1](t) ,

i have used step by step time integration method (of an ebook which i have attachted that part of ebook here), when i set time step of solving process to h=0.01 , i can solve this system up to time one second or more, but when i choose h=0.001 or smaller, the answer diverges after 350 steps . i do not know whether the problem is in my ODS system, or maple can not handle this ?the answer about the time t=0.3 are the same in both steps, but after that, the one with stpe time h=0.001 diverges. my friend has solved this in mathematica without any problem, could any body help me ?! it is urgent for me to solve this problem,thnx everybody.


ebook.pdf  step_=_0.001.mw  step_=_0.01.mw 

m:=proc(n::list)
local N, S, i:
N:=nops(n);
S:={};
for i from 1 to N do
if n[i]=1 then do
S:=S union {i}; break; od; fi; od;
for i from 1 to N do
if n[i]=0 then do
S:=S union {}; break; od; fi; od;
end proc;

 

the procedure works if the last member of a list is 0, for example 

m(1,0,1,0); 

returns {1,3}

 

but if it ends in 1, nothing gets returned, example: m(1,0,1);

I can also get it to work the other way around, where it'll return the set if the list ends in 1 but not zero. I need it to work for both.

Please look at the following set.

restart; Z := {x1*(h1+h3) = 0, b1*x1+b4*x3 = 0, f2*x2+f3*x1 = 0, g2*x2+g4*x3 = 0, d1*x1+d2*x2+d4*x3 = 0}; for i to numelems(Z) do print(Z[i]) end do; "++++++++++++++++"; h3 := -h1; x3 := x2; g2 := -g4; Z; print("The following loop gives wrong result! The last element d1*x1+d2*x2+d4*x2=0 of set Z have disappeared!"); for i to numelems(Z) do print(Z[i]) end do

{x1*(h1+h3) = 0, b1*x1+b4*x3 = 0, f2*x2+f3*x1 = 0, g2*x2+g4*x3 = 0, d1*x1+d2*x2+d4*x3 = 0}

 

x1*(h1+h3) = 0

 

b1*x1+b4*x3 = 0

 

f2*x2+f3*x1 = 0

 

g2*x2+g4*x3 = 0

 

d1*x1+d2*x2+d4*x3 = 0

 

"++++++++++++++++"

 

{0 = 0, b1*x1+b4*x2 = 0, f2*x2+f3*x1 = 0, d1*x1+d2*x2+d4*x2 = 0}

 

"The following loop gives wrong result! The last element d1*x1+d2*x2+d4*x2=0 of set Z have disappeared!"

 

0 = 0

 

b1*x1+b4*x2 = 0

 

f2*x2+f3*x1 = 0

 

0 = 0

(1)

``

``

Why?

Download Set.mw

Can we define/set a range in Maple. e.g 


I have the following equation:

y = 1.048 + 1.02*x + 6.118*(z-4.041*x^2) + 16.22*(z^2) +6.241* (x*z)

The value of z is within 0.001 - 0.543, y is from 1 - 12 and x is from 0.001 - 0.7

How should I define it in Maple, so while solving equations it read the values within the given range? 


I am trying to solve a set of equations for a Fluid dynamics problem and I cannot get a result...Any ideas why?

rho := 1.184;
nu := 1.562*10^(-5);
ID := .15;
L := 24.5;
Kl := 12.69;
Ho := 50.52;
a := 2.1*10^(-5);
E := 0.1e-2; alpha := 1.05;

sys := {Re = ID*V/nu, hl = (f*L/ID+Kl)*V^2/(2*9.81), Vflow = (1/4)*Pi*ID^2*V, Hrequired = alpha*V^2/(2*9.81)+hl, Hrequired = -a*Vflow^2+Ho, 1/sqrt(f) = -1.8*log[10](6.9/Re+(E/(3.7))^1.11)};

solve(sys*{Re, V, f, hl, Vflow, Hrequired});
%;
Error, (in unknown) invalid input: Utilities:-SetEquations expects its 2nd argument, equations, to be of type set({boolean, algebraic, relation}), but received {{Re = (9603072983/1000000)*V, hl = (5096839959/100000000000)*((1633333333/10000000)*f+1269/100)*V^2, Vflow = (9/1600)*Pi*V, Hrequired = (5351681957/100000000000)*V^2+hl, Hrequired = -(21/1000000)*Vflow^2+1263/25, 1/f^(1/2) = -(9/5)*ln((69/10)/Re+27367561/250000000000)/ln(10)}}

 

Hi there!

Maple has lot's of datatypes which are very related to each other, such as Matrices and Arrays, or sets, lists and vectors.

Most of the time I am not quite sure which type is the "right" one to use for me, and I guess for most of the stuff I have done so far it didn't really matter. However now I am going a bit into numerics, and there things can get big and computationally expensive. Also, recently I got an error message stating that I would assign a large list to a variable, and should rather use an Array instead. So I guess I should start to bother what to use. : )

Obviously the Matrix has some advantages to the Array in the sense that I can perform matrix calculations with it easier using the LinearAlgebra package. So it can be transposed and what not. But is it disadvantegeous to the Array in any way, especially when it comes to large matrices in numerical calculations?

The same would interest me for sets, lists and Vectors.

Cheers!

Gernot

Suppose one sets a system of differental equations in vector form, say 2 ODE's, like this:

restart;
with(LinearAlgebra):
ode:=Vector([diff(x(t),t),diff(y(t),t)])=Vector([2*x(t)+y(t),3*y(t)-x(t)]);

Then to solve these, what would be an easy way to do it, without having to rewrite them again manually as a set, as what one would normally do. Clearly one needs to map dsolve, and also convert the vectors to a set somewhere? I am not able to get the syntax right.

Is there an easy way to automatically convert/rewrite the above to

ode2:= diff(x(t),t)=2*x(t)+y(t)  ,   diff(y(t),t)=3*y(t)-x(t);

so that I can just do

dsolve({ode2},{x(t),y(t)});

Or, a way to map dsolve directly into the first from as shown?( the Vector = Vector form).

Hi,

 

I'm trying to develop a new notation and am having problems with lists vs. sets.

Basically I have things of the form [[a,b]],[[c,d,e]],[[f],[f,h]] and I want to change them to the form [{a,b}],[{c,d,e}],[{f},{f,h}].

I start from a flat list [a,b,c,d,e,f,f,h] and then divide it up, so using sets initially would lose repeated elements. But then once it has been divided up, I need the innermost brackets to be sets.

 

Ok, so here's my first question on Mapleprimes.  

I have the following procedure:

BlocksLSymm:=proc(stringLength) 
local i, j, V;
global vars_set;
V:=Vector(2^(stringLength)+1,symbol=x):
# Create List
vars_set:={};
x[1]:=x[2];
for i from 0 to stringLength do 
 for j from 0 to i do
  vars_set:={op(vars_set), x[2^i-2^j+1]};
 end do; 
end do;
end proc: 

BlocksLSymm(5);

vars_set; 

Hi,

 

I have a list of sets eg. L:=[{a},{b,c},{d,a,f},{b,d}] and I'm having problems doing operations on it. 

I want to be able to take the first element (a here), look for the next occurrence of it and return what is in the set with it (here d and f).

However I can't seem to use Search or Occurrences as they consider the sets themselves to be the elements. For instance Search(a, L) returns 0. 

 

What can I do?

Hi,

Help please! Maple beginner here. I'm trying to relabel a list of lists and sets so that the third occurrence of each number becomes that number+1,

 

eg. [[1],[{1,2}],[{1,2}]] ----->  [[1],[{1,2}],[{2,3}]]

or [[1],[{1,2,3}],[{1,2}]] -----> [[1],[{1,2,3}],[{2,3}]]

 

I think because there are sublists and subsets, I can't use things like member(x, s, 'p') or SearchAll (ListTools), so not sure what to do. Any suggestions?

i confused for finding a very special command that can join a "set of values" to a "set of indices " ?

also i can't use the map command for this ( guide ? )

like this :

{(1,1),(1,2),(2,1),(2,2)}

{1,2,3,4}

i want to join the two sets to form a complet set of equations index :

{(1,1)=1,(1,2)=2,(2,1)=3,(2,2)=4}

since this is just a simple example , but i need an efficent way for doing it in large size data (image processing)

appreciate for answering !

 

I have a set of sets named T. How I can take all possible unions of the members of T and if the result is not in T already, include it in T. I want to do this using a seq command, but could not do. Can anyone help? This is so to say, T is to be made closed under union.

1 2 3 Page 1 of 3