Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
A C A C is offline
external usenet poster
 
Posts: 8
Default Is there an object similar to Matlab vectors/matricies/cells?

Hello

I am after a vector/matrix/cell style object like there is in Matlab whereby
we can read data into this matrix and maipulate it. All the sizing etc is
automatically accounted for by the object itself when the data is assigned
to the object, and its easy to do things like pull out columns 1--5, count
etc etc.

Converting from an existing Matlab program and Matlab has lots of nice
features for manipulating cells/vectors/matricies which I would love to have
avaiable.

Contents is not just numbers so its not a math vector etc I am after. For
example it might read in a table of data where some fields are text and some
are numbers. Basic manipulation, for example append, combine, remove these
cols, remove these rows, sort, remove repeats, unique etc etc.

Regards
A


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Is there an object similar to Matlab vectors/matricies/cells?

The only thing like Matlab in Excel is Matlab itself. That is,
Mathworks sells an Excel add-in that uses Matlab for all the
computations. I think its pretty spendy though.

Really, the closest built-in object with the capabilities that you're
describing is probably a worksheet. Excel has a few built-in matrix
functions, but with nowhere near Matlab's capabilities. You'd have to
code a lot of it yourself.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Is there an object similar to Matlab vectors/matricies/cells?

Hi. Excel can't do these operations as well as a dedicated math program.
If you would like, here are some ideas that may help a little. Good luck.
:)

... things like pull out columns 1--5, count
etc etc.


Sub Demo()
Dim v, c
Const All As Long = 0

'// 2 Dim array from A1:C5
v = [A1:C5]

With WorksheetFunction
'// Extract all rows in the 2nd Column...
c = .Transpose(.Index(v, All, 2))

'// How many elements?
Debug.Print "Number of items:";
Debug.Print (UBound(v, 1) - LBound(v, 1) + 1) * (UBound(v, 2) -
LBound(v, 2) + 1)

'// Simulate "AppendTo"
'// Add a new row (simulate adding a new list item)
v = .Transpose(v)
ReDim Preserve v(1 To UBound(v, 1), 1 To UBound(v, 2) + 1)
v = .Transpose(v)
v(UBound(v, 1), 1) = "a"
v(UBound(v, 1), 2) = "new"
v(UBound(v, 1), 3) = "row"
End With

End Sub

HTH:
--
Dana DeLouis
Win XP & Office 2003


"A C" wrote in message
...
Hello

I am after a vector/matrix/cell style object like there is in Matlab
whereby
we can read data into this matrix and maipulate it. All the sizing etc is
automatically accounted for by the object itself when the data is assigned
to the object, and its easy to do things like pull out columns 1--5,
count
etc etc.

Converting from an existing Matlab program and Matlab has lots of nice
features for manipulating cells/vectors/matricies which I would love to
have
avaiable.

Contents is not just numbers so its not a math vector etc I am after. For
example it might read in a table of data where some fields are text and
some
are numbers. Basic manipulation, for example append, combine, remove
these
cols, remove these rows, sort, remove repeats, unique etc etc.

Regards
A




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Is there an object similar to Matlab vectors/matricies/cells?

In excel, that would be a spreadsheet.

--
Regards,
Tom Ogilvy


"A C" wrote in message
...
Hello

I am after a vector/matrix/cell style object like there is in Matlab

whereby
we can read data into this matrix and maipulate it. All the sizing etc is
automatically accounted for by the object itself when the data is assigned
to the object, and its easy to do things like pull out columns 1--5,

count
etc etc.

Converting from an existing Matlab program and Matlab has lots of nice
features for manipulating cells/vectors/matricies which I would love to

have
avaiable.

Contents is not just numbers so its not a math vector etc I am after. For
example it might read in a table of data where some fields are text and

some
are numbers. Basic manipulation, for example append, combine, remove

these
cols, remove these rows, sort, remove repeats, unique etc etc.

Regards
A




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Is there an object similar to Matlab vectors/matricies/cells?

A C wrote:
Hello

I am after a vector/matrix/cell style object like there is in Matlab whereby
we can read data into this matrix and maipulate it. All the sizing etc is
automatically accounted for by the object itself when the data is assigned
to the object, and its easy to do things like pull out columns 1--5, count
etc etc.

Converting from an existing Matlab program and Matlab has lots of nice
features for manipulating cells/vectors/matricies which I would love to have
avaiable.

Contents is not just numbers so its not a math vector etc I am after. For
example it might read in a table of data where some fields are text and some
are numbers. Basic manipulation, for example append, combine, remove these
cols, remove these rows, sort, remove repeats, unique etc etc.

Regards
A


You might want to review the freely downloadable file at
http:/home.pacbell.net/beban to see whether any of the functions might
be helpful.

Alan Beban


  #6   Report Post  
Posted to microsoft.public.excel.programming
A C A C is offline
external usenet poster
 
Posts: 8
Default Is there an object similar to Matlab vectors/matricies/cells?

Thanks. Do you have an examples/demos of it working (programming skills not
great yet) so I can see how you declared things and how you called them.
Can it handle data that has multiple types? eg strings in some cells and
numbers in others all within the same range? That said maybe I can just
assume they are all strings, im not really wanting to do any calcs with the
contents just reformatting and outputting etc.

Regards
A

"Alan Beban" wrote in message
...
A C wrote:
Hello

I am after a vector/matrix/cell style object like there is in Matlab

whereby
we can read data into this matrix and maipulate it. All the sizing etc

is
automatically accounted for by the object itself when the data is

assigned
to the object, and its easy to do things like pull out columns 1--5,

count
etc etc.

Converting from an existing Matlab program and Matlab has lots of nice
features for manipulating cells/vectors/matricies which I would love to

have
avaiable.

Contents is not just numbers so its not a math vector etc I am after.

For
example it might read in a table of data where some fields are text and

some
are numbers. Basic manipulation, for example append, combine, remove

these
cols, remove these rows, sort, remove repeats, unique etc etc.

Regards
A


You might want to review the freely downloadable file at
http:/home.pacbell.net/beban to see whether any of the functions might
be helpful.

Alan Beban



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Excel like Matlab? sjlesnia Excel Discussion (Misc queries) 0 March 21st 07 10:14 PM
Matlab & Excel interface? cfman Excel Discussion (Misc queries) 1 March 21st 07 06:03 PM
Pasting data from Matlab to Microsoft Excel nt_artagnian Excel Worksheet Functions 5 March 3rd 07 07:47 PM
how can ý call matlab function from matlab to excel gurhan Excel Discussion (Misc queries) 0 November 29th 06 08:40 AM
how do i do an inline function like in matlab jonathon wycherley Excel Worksheet Functions 4 December 11th 04 12:15 AM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"