To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 4431
4430  |  4432
Subject: 
Multi dimentional Arrays
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 29 Sep 1998 10:21:35 GMT
Original-From: 
Javaid Iqbal <{p2219212@student}AvoidSpam{.mech.unsw.edu.au}>
Viewed: 
1188 times
  
Hi All,
I am trying to write a code for fuzzy logic and using Matrix havig a size
of 10X10, but it gives an error (stack overflow). When i reduce the size
of matrix to 6X6 it works perfectly.I am using IC 3.0.
Can I  use a matrix having a size greator than 6x6, if there is a way, can
anybody help me out.
Thanks in advance.




Kind Regards

Sincerely,
Javaid Iqbal
------------------------------------------------------------------------
|  ************  Uni of New South Wales, Sydney, Australia ************  |
------------------------------------------------------------------------



Message has 2 Replies:
  Re: Multi dimentional Arrays
 
(...) <snip> You might try using a one-dimensional array of size 100, along with a simple indexing function to simulate a two-dimensional array: int myarray[ 100 ]; int index( int row, int col ) { return 10 * row + col; } void main() { int i = 0, j (...) (26 years ago, 29-Sep-98, to lugnet.robotics.handyboard)
  Re: Multi dimentional Arrays
 
(...) I don't know how big the IC stack is, but I suspect you are overflowing it because you're allocating the array on the stack. If it's an array of floating point the 10x10 array will be at least 400 bytes, and most likely larger. Try allocating (...) (26 years ago, 29-Sep-98, to lugnet.robotics.handyboard)

3 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR