relativeway

15 Reputation

4 Badges

13 years, 249 days

MaplePrimes Activity


These are replies submitted by relativeway

Thanks a lot! That'll do it.

Thanks a lot! That'll do it.

Since zip can only be used with a pair of vectors, any suggestions on how to do a similar calculation using say 3 or more vectors?

 

For example:

u1:=<1,1,1>;

u2:=<1,2,3>;

u3:=<2,3,4>;

f:=ln(u1-u2)+u3;

Since zip can only be used with a pair of vectors, any suggestions on how to do a similar calculation using say 3 or more vectors?

 

For example:

u1:=<1,1,1>;

u2:=<1,2,3>;

u3:=<2,3,4>;

f:=ln(u1-u2)+u3;

Thanks for your answer.

Is there a way to do use this to get a to be a 1x3 vector rather than a 1x9 vector. I'm looking for a 1x3 solution that will use the two 1x3 vectors such that:

a[1]:=ln(u[1]-v[1]);

a[2]:=ln(u[2]-v[2]);

a[3]:=ln(u[3]-v[3]);

 

The zip method does work in the 2 vector case, but I was also wondering about the more general case where one might use 3 or more vectors in the solution.

Thanks for your answer.

Is there a way to do use this to get a to be a 1x3 vector rather than a 1x9 vector. I'm looking for a 1x3 solution that will use the two 1x3 vectors such that:

a[1]:=ln(u[1]-v[1]);

a[2]:=ln(u[2]-v[2]);

a[3]:=ln(u[3]-v[3]);

 

The zip method does work in the 2 vector case, but I was also wondering about the more general case where one might use 3 or more vectors in the solution.

Thanks for your answers, though I'd like to use a procedure inside of the for loop.  The problem seems to be that the j value varies in the procedure name, but it does not vary inside of the procedure itself.


You can see this from the original code output:

z_1:=proc(x,y) x+y^j end proc
z_2:=proc(x,y) x+y^j end proc

Thanks for your answers, though I'd like to use a procedure inside of the for loop.  The problem seems to be that the j value varies in the procedure name, but it does not vary inside of the procedure itself.


You can see this from the original code output:

z_1:=proc(x,y) x+y^j end proc
z_2:=proc(x,y) x+y^j end proc

Is there any way to get the j value to vary inside of the procedure using the value from the for loop rather than needing to manually specify it?

I tried a few different things but the j value inside the procedure doesn't seem to vary and if possible it would be nice to create these procedures in one for loop.

Many thanks.

Is there any way to get the j value to vary inside of the procedure using the value from the for loop rather than needing to manually specify it?

I tried a few different things but the j value inside the procedure doesn't seem to vary and if possible it would be nice to create these procedures in one for loop.

Many thanks.

That definitely helped. I'm not seeing any reference to listlist in the documentation, but I'll use this in the future. Thanks again.

That definitely helped. I'm not seeing any reference to listlist in the documentation, but I'll use this in the future. Thanks again.

Page 1 of 1