Thread: matlab (split)

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    1

    matlab (split)

    Hi All
    i am doing programming in Matlab. i want to declare an array which should be dynamic. i don't how much data i will receive while program is running. i want the array to increase if data is increased. Please suggest any solution as i cannot include libraries in it.

  2. #2
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by wafeeqg View Post
    i am doing programming in Matlab.
    Hi,
    are you sure you posted on the right forum?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Moved
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    By default all arrays in MATLAB are dynamic; they expand in size when you access out of the current array bounds. Try:

    Code:
    a = [1, 2; 3, 4];
    a(5,2) = 7

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. split strings (and split thread)
    By mahi in forum C Programming
    Replies: 1
    Last Post: 10-31-2011, 06:56 AM
  2. Matlab vs. R
    By ch147 in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 11-14-2007, 11:57 AM
  3. C/C++ and Matlab?
    By darkwalk in forum C++ Programming
    Replies: 2
    Last Post: 10-21-2006, 03:00 AM
  4. Matlab to C/C++
    By jisarrar in forum C Programming
    Replies: 2
    Last Post: 01-31-2006, 07:01 AM
  5. MATLAB Help
    By Lrnr in forum Tech Board
    Replies: 2
    Last Post: 02-23-2003, 10:29 AM