Converting between java-matlab
- From: "Andrea Tagliasacchi" <ata2@xxxxxxxxxxxxxxxx>
- Date: Mon, 21 Jul 2008 16:50:19 +0000 (UTC)
Hello there.
Supposed that I have a list of points (that form a path)
that is dynamically grown (no size known a-priori) during
the running of my algorithm.
In matlab, I can use two solutions to add the next element
to the list, the first:
list = zeros(0,3);
list(end+1,:) = [newx, newy, newz];
which requires no further matlab conversion.
The second would be using java built in functionalities:
list = java.util.Vector();
list.add( [newx, newy, newz] );
However, to be able to use this data structure in further
computation I have to convert it to matlab arrays. The
documentation says that a call to "double( list )" solves
the problem but I get an error saying that conversion
between types is not possible.
The other way of converting would be to make a cycle that
scans the vector but we all know how matlab cycles are NOT
efficient.
Do you have any smart suggestion to provide for such a
simple problem? Either a way for converting the vector
efficiently or a completely new way to solve this problem
Thanks
--
Andrea
.
- Follow-Ups:
- Re: Converting between java-matlab
- From: Donn Shull
- Re: Converting between java-matlab
- Prev by Date: Re: textscan delimiter problem
- Next by Date: multiple plots in the same figure
- Previous by thread: Writing Binary file to reduce file size
- Next by thread: Re: Converting between java-matlab
- Index(es):
Relevant Pages
|
Loading