From: Roshini Johri on
hi,

i need to create a 3d matrix for points like
-0.0708718 3.06386 6.19473
-0.0475281 3.07586 6.21423
-0.0232222 3.08565 6.23409
0.00333004 3.09293 6.25692
0.0292223 3.0987 6.2796
0.0550647 3.09793 6.30483
0.079721 3.09433 6.32766
0.101421 3.08415 6.34956
0.121546 3.06947 6.37246
0.142592 3.05429 6.3944



within a range of -1 to 9 which may vary for different files. i am not sure how to represent this. can anyone help me out please.

thankx
From: us on
"Roshini Johri" <roshini20(a)gmail.com> wrote in message <i2juhl$68s$1(a)fred.mathworks.com>...
> hi,
>
> i need to create a 3d matrix for points like
> -0.0708718 3.06386 6.19473
> -0.0475281 3.07586 6.21423
> -0.0232222 3.08565 6.23409
> 0.00333004 3.09293 6.25692
> 0.0292223 3.0987 6.2796
> 0.0550647 3.09793 6.30483
> 0.079721 3.09433 6.32766
> 0.101421 3.08415 6.34956
> 0.121546 3.06947 6.37246
> 0.142592 3.05429 6.3944
>
>
>
> within a range of -1 to 9 which may vary for different files. i am not sure how to represent this. can anyone help me out please.
>
> thankx

well... the content of your mat is not clear from what you show CSSM...

one of the (general) solutions

m=rand([2,3,2]);
m=bsxfun(@plus,m,[0,3,6]); % <- play with this...
disp(m);
%{
% based on current RAND, of course(!)...
(:,:,1) =
0.23478 3.8212 6.043
0.35316 3.0154 6.169
(:,:,2) =
0.64912 3.6477 6.547
0.73172 3.4509 6.2963
%}

us
From: Roshini Johri on
"us " <us(a)neurol.unizh.ch> wrote in message <i2jvnp$luf$1(a)fred.mathworks.com>...
> "Roshini Johri" <roshini20(a)gmail.com> wrote in message <i2juhl$68s$1(a)fred.mathworks.com>...
> > hi,
> >
> > i need to create a 3d matrix for points like
> > -0.0708718 3.06386 6.19473
> > -0.0475281 3.07586 6.21423
> > -0.0232222 3.08565 6.23409
> > 0.00333004 3.09293 6.25692
> > 0.0292223 3.0987 6.2796
> > 0.0550647 3.09793 6.30483
> > 0.079721 3.09433 6.32766
> > 0.101421 3.08415 6.34956
> > 0.121546 3.06947 6.37246
> > 0.142592 3.05429 6.3944
> >
> >
> >
> > within a range of -1 to 9 which may vary for different files. i am not sure how to represent this. can anyone help me out please.
> >
> > thankx
>
> well... the content of your mat is not clear from what you show CSSM...
>
> one of the (general) solutions
>
> m=rand([2,3,2]);
> m=bsxfun(@plus,m,[0,3,6]); % <- play with this...
> disp(m);
> %{
> % based on current RAND, of course(!)...
> (:,:,1) =
> 0.23478 3.8212 6.043
> 0.35316 3.0154 6.169
> (:,:,2) =
> 0.64912 3.6477 6.547
> 0.73172 3.4509 6.2963
> %}
>
> us

hey,
i cant use rand as my values are fixed... its the data obtained from the xyz coordinates of a robotic arm. i have to use the data make a 3d matrix of that space where i have to put a 1 in the points the trajectory went through. and 0 at the rest so that i can do box counting.
From: us on
"Roshini Johri"
> hey,
> i cant use rand as my values are fixed... its the data obtained from the xyz coordinates of a robotic arm. i have to use the data make a 3d matrix of that space where i have to put a 1 in the points the trajectory went through. and 0 at the rest so that i can do box counting.

well... show a ...clear... example of your input/output...

us
From: Roshini Johri on
the input is a file:
-0.113841 2.49026 3.21937
-0.106402 2.51352 3.23339
-0.09883 2.53819 3.25009
-0.0922281 2.56199 3.26873
-0.0845963 2.58945 3.28759
-0.0748642 2.61935 3.30635
-0.0668199 2.64584 3.32856
-0.0584499 2.67328 3.34954
-0.0496012 2.7031 3.3711
-0.0392404 2.73345 3.39296
-0.0271462 2.76531 3.41464
-0.0145192 2.79629 3.43655
-0.00185737 2.82688 3.46028
0.011218 2.85985 3.48533
0.0229557 2.89055 3.51378
0.0336748 2.91874 3.54477
0.0468511 2.94737 3.57409
0.0624388 2.97831 3.60106
0.0764864 3.00753 3.62857
0.0927123 3.04 3.6576
0.107162 3.06947 3.68929
0.120034 3.09765 3.72447
0.131822 3.12503 3.76076
0.146353 3.15588 3.79677
0.160664 3.18512 3.83334
0.17726 3.21603 3.86912
0.192937 3.24605 3.90643
0.208992 3.27457 3.94581
0.223467 3.3009 3.98738

this is part of the file... the points go on like this and they range in between -1 to 7


"us " <us(a)neurol.unizh.ch> wrote in message <i2k208$jet$1(a)fred.mathworks.com>...
> "Roshini Johri"
> > hey,
> > i cant use rand as my values are fixed... its the data obtained from the xyz coordinates of a robotic arm. i have to use the data make a 3d matrix of that space where i have to put a 1 in the points the trajectory went through. and 0 at the rest so that i can do box counting.
>
> well... show a ...clear... example of your input/output...
>
> us