## 15 Reputation

13 years, 170 days

## Thanks...

Thanks a lot! That'll do it.

## Thanks...

Thanks a lot! That'll do it.

## Extension to n vectors...

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;

## Extension to n vectors...

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;

## Another question...

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.

## Another question...

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.

## Within a procedure...

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

## Within a procedure...

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

## Any way to just use j locally...

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.

## Any way to just use j locally...

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.

## Thanks for that....

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

## Thanks for that....

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
﻿