Array Definition and 501 Threads

  1. L

    MATLAB Why am I not getting an array when using inverse tangent on an array in MATLAB?

    Hi guys, I am having a problem here with a MATLAB m.file, I am trying to take the inverse tangent of an array and expect from this function to get another array, but for some reason I don't get an array just a single number. Any MATLAB guru that could help me with this problem? Thanks...
  2. L

    C/C++ Can Array Overruns Lead to Catastrophic Failures?

    Can over running of array lead to the catastrophic failures? If ‘Yes’ then why does not C++ provide bound checking on array operations and who is responsible to prevent array overruns?
  3. N

    Help Reading A .txt File Into A 2D Array In C

    Homework Statement The program is to read in a file full of numbers formatted like this: The first line contains a single int n. Following this line, there will be n lines with n ints each separated by whitespace. So I have asked the user for a file path and read in the first number ('n')...
  4. L

    Proving Boundedness of Double Index Array | Math Problem

    I'm just don't get this question. from my text: define\ t_{mn}\ =\ \sum^{m}_{i=1}\sum^{n}_{j=1}|a_{ij}|, [a_{ij}\ is\ a\ doubly\ indexed\ array\ of\ real\ numbers.] (a)\ prove\ that\ the\ set\ \{t_{mn}\ :\ m,n\ \in\ N\}\ is\ bounded\ above. (b)\ use\ (a)\ to\ conclude\ that\ (t_{nn})\...
  5. S

    Infinite Loop problem in an array sorting program

    Hi, I am writing a function that takes in a real data array and a key partition value, which will rearrange the array so that elements with a lower value than x are placed before the elements with values >= the partition value. It then returns the index of the last element of the array with a...
  6. K

    What is the equation for finding the maximum frequency in a towed-array sonar?

    Homework Statement A towed - array sonar comprises 100 transducers equally spaced at every 3m and towed behind a ship so the array stays just below the surface of the water (effectively horizontal). An adjustable phase delay can be introduced for each transducer, allowing the sonar beam to be...
  7. L

    Coding a Bubble Sort routine using a pointer array

    I have been asked to code a Bubble Sort using a pointer array and pointer notation as opposed to the square bracket notation...(there should be two uses of square brackets when declaring the arrays). It will not work! :( Basically the data does not sort. I am trying to swap pointer array...
  8. N

    Help With Assigning An Array With rand()

    Homework Statement I need to write a function that takes an int array and the size of the array as parameters, then finds the largest num in the array, returns this value and then sets the value to zero. Then in the main part of the program, I need to create an int array of 20 nums, assign...
  9. E

    Constructing a Tubular Bell Array: Solving the Wave Equation

    I have the next theoretical-practical problem. I have to build a tubular bell array (like that at symphonic orchrestas) with tubes (not rods) of aluminium or copper. The principal problem I have is I don't know how to state the wave equation for a tube (I have done it for a string). How I do it...
  10. B

    Comp Sci Find the Second Largest Integer in a Java Array | Simple Function Example

    Q1. Write a function that accepts an array of integers and returns the second largest integer in the array. Return -1 if there is no second largest. The signature of the function is public class ID { public static void main(String[] args){ } int f(int[ ] a) { } } Examples...
  11. M

    Square array (electric field question)

    Homework Statement Four charges q1 = q3 = -q and q2 = q4 = +q, where q = 6 µC, are fixed at the corners of a square with sides a = 1.3 m. (see attached .gif) Calculate the x- and y-components of the net electric field at the midpoint M of the bottom side of the square. Homework...
  12. E

    Understanding Array Elements: n^2 vs. 8*n

    Homework Statement For the problem at this site http://www.kalva.demon.co.uk/putnam/psoln/psol859.html, how an array with n^2 elements contain 8*n elements (8 for each positive integer) when n is not equal to 8? Does that type of algebra not work with an infinite number of elements...
  13. P

    Java How can I add an integer to a sorted array using binary search in Java?

    Hello, I need to write a method that adds an interger to a sorted array of integers. I'm using the following code to search for an interger in the array private static int binarySearch(int[] list, int key, int low, int high) { while (low <=...
  14. T

    SKA: What's Being Planned & Job Prospects?

    Does anyone know what kinds of things are being planned for study at the SKA when its built? i know its going to be a radio telescope, and hopefully in Australia/NewZealand instead of South Africa (it'll be based only a few hours out of Perth WA, where i live :biggrin:)... and also, what...
  15. P

    Comp Sci Trouble Expanding an Array of pointers in C++

    Homework Statement I am working on a program that reads in names (strings), sorts them, and then later is searchable. The problem I am having is this. When I enter the first 20 elements of the array, everything works fine. When I enter the 21 element (when it goes into the if loop) I get...
  16. B

    Selecting a Section of an Array in IDL

    Homework Statement I'm looking for a function in IDL that will select a certain section of an array. The Attempt at a Solution I could technically do this in a loop, but I saw that another student in my lab had a real simple single line function. I'm reading in a .wav file, which has...
  17. G

    C/C++ How can I pass a 2D array in C++ without errors?

    1. The problem I am having is that I am trying to pass a two dimensional array from my main function to a secondary function. I know it has to be call by reference and using the name of the matrix, "matrix" in my case should send the location. Also since it has more than one dimension there...
  18. K

    Java How do display/generate webpage content with info from an array in a .java file?

    Does anyone know how I would go about displaying/generating webpage content with info from an array in a .java file? Suppose you click on cars.com, once you do, the webpage will display the contents (say car names) of an array from a .java file. How do I do this? Thanks.
  19. D

    How can I read values from multiple textboxes into a 2-D array in VB.NET?

    Hi I am a new-comer to VB.Net & I am working with arrays at the moment.i want to write a procedure that accepts two 2-D arrays(max size being a 4*4 matrix). i don't know how i could get the procedure to read in these values from the sixteen different textboxes i have created...i started using a...
  20. S

    Inputting Array Values in Assembly: Solving the Problem

    Well I'm hoping it's simple, after all I'm not too good at this lol i am trying to get the user to input values for an array using: #include <stdio.h> #include <stdlib.h> int main(void){ int marks[4]; char format[] = "%i"; _asm { markone: lea eax, marks[0]; push eax; lea...
  21. R

    Wythoff' array and Wechsler's Sequence

    Wythoff's square array is Sloane's reference A035513 in the online encyclopedia of sequences (click the "table" button to see the sequence as a table) and Allan Wechsler's sequence is A022344. To my knowledge the following connection has not been noted before. Let T(i,j) be defined from the...
  22. K

    Fortran How to Handle Outliers in Array Data in Fortran?

    Hello I have a bunch of data in a text file that got loaded into an array. Now the problem is that there are a lot of outliers. So let's say if I find the outlier, how do I get rid of it, by say move the next one to that spot. If I do that how do I redefine the arrary size. What would be...
  23. F

    LED Light Array: Why Several Small Ones vs One Large?

    There's a lot of products with LED's these days. However I was wondering why a light made with LED's is done with an array on LEDs instead one large one. Can we not make a large one? Is it possible to make a large LED but it's actually more efficient to have several smaller ones? Any...
  24. T

    MATLAB Create a square array in matlab

    Hi, I realize this is a physics forum, but thought someone may be able to help! I would like to create a square array i.e 4x4 and then plot a vector of data (16 elements) over this 4x4 array. I have created the following code, it doesn't work but that's what I am ideally aiming after...
  25. R

    Hallback Array Closed Loop Coil

    Hi all, I'm new to this forum and I'm not a physicist. I'm a Cabinet Maker looking for a career change. I performed an advanced search on the entire site and was surprised to find not a mention in regards to Halbach Array. My understanding is that the special arrangement of nib magnets can...
  26. C

    Implementing an average counter for an array

    i need to get this array to calculate the numbers that are less than the average and greater than or equal to the average. first of all, i need to figure out how to make a counter to count the average of the array! i can't find the code in the textbook here's what i have so far: #include...
  27. Z

    VB Error: Array Names are Ambiguous - What Now?

    To those who helped yesterday,again, thanks. I have managed to resolve most of my problems, however, i have a new issue. VB seemsto think that the names of my arrays are "ambiguous", WHY? what do i need to do to resolve this new and fustrating problem?
  28. T

    Calculating Equivalent Capacitance of Infinite Array with Co as Capacitance

    see diagram for this at http://img.photobucket.com/albums/v11/biggm/cap.jpg Question: Determine the eqivalent capacitance C between terminals X and Y of the infinite set of capacitors represented. Each capacitor has capacitance Co. Suggestion: imagine that that ladder is but at the line...
  29. P

    Array Arithmetic in C: Incrementing Integers in an Array

    int f[5]; Is it possible to do f[i]+=1; inside a valid for loop? If not than how can I increment integers stored in an arrary for each i in C? Thanks
  30. S

    Writing the Constructor for the Array for Objects

    consider the program Class A { int a; public: A(int m = 0) { a = m; } } int main() { int i = 0; /* Intansiate/Initilize Object with the Constructor */ A Object(0); /* Here is the Problem */ /* Create the 32 Objects of Class A */ A nObjects[32]...
  31. R

    What is the Magical Property of the Fibonacci Array?

    The following array is based on the Fibonacci series. The first row is simply the Fibonacci series. Each nth row are Fibonacci type series where the generating numbers in columns 1 and 2 are determined as follows. The numbers in column 1 are the row number and the number to the right of the...
  32. R

    Finding Jso for Antenna Array in Vacuum

    Antenna array consists of two infinite plane parallel sheets in the xy plane spaced half a wavelength apart and having current densities. Wave is propagating in vacuum. J_{s1} = J_{so}cos(\omega t) \vec{i} z = 0 J_{s2} = J_{so}sin(\omega t) \vec{i} z = \frac{\lambda}{2} The...
  33. M

    Questions About the Sky: An Array of Questions

    Hi some questions have been plaguing me when I look up at the sky. 1) Does anything exist between galaxies? Are there any lonely stars, black holes, rocks, planets,gas or anything between galaxies. Or do these things only form within galaxies? 2) I know about black holes, but I can't...
  34. A

    Can you find the solution with this additional property?

    A[r,c] = \left(\begin{array}{cccccc} \frac{1}{2}\multsp \left(1+{\sqrt{5}}\right)&-&-&-&-&...\\ \frac{1}{4}\multsp \left(2+{\sqrt{8}}\right)&\frac{1}{4}\multsp \left(1+{\sqrt{5}}\right)&-&-&-&...\\ \frac{1}{6}\multsp \left(3+{\sqrt{13}}\right)&-&\frac{1}{6}\multsp...
  35. Math Is Hard

    C/C++ How to Track Array Positions of Words in a C++ Sentence?

    I believe I am stuck. :frown: I need to traverse an array which will contain a sentence the user enters and identify the array positions of the first and last letters of each word in the sentence. I can do the first word, but I am not sure how to move it along after that. I am thinking I need...
  36. Monique

    Finding the Largest Numeric Value in an Array: A Perl Solution

    How do you return the largest numeric value in an array, in Perl?
  37. I

    MATLAB Is it possible to perform array operations on rows of a matrix in Matlab?

    Array operations in Matlab? Is it possible to apply operations to the rows of a matrix as an array? Such as I have a matix A which is 30 rows by 1 column and I want to treat each row as a vector such that I can solve for the polynomial roots of each row using the roots comand (treating each row...
  38. RadiationX

    Enhance Your Coding Skills: FOR Loop and Array Problem Solving Resources

    Does anyone know of a site that has some problem solving using FOR loops and or Arrays?
  39. D

    What Resistance Does an Ohmmeter Read in an Infinite 2x2 Resistor Array?

    ... | ... R ... | -R- --R ... | ... R Suppose you have an infite array (2by2) of resistors, each of value let's 1k. If you place the an ohmeter accres one resistor, what resistance will the ohmeter read?
  40. B

    Help! Filling an Array with Unfamiliar Series

    I have a programming assignment to fill an array with this series: 1,4, 9, 25, 36, …. The problem is I don't know what this series is so I can't write the program. Can anyone help?
  41. S

    MATLAB How Do You Create a Large Character Array in MATLAB?

    Hi, I hope you can help, I'm trying to create an array of characters in matlab: It has to be 100 x 5000 in size, I'm not to sure where to start. I've looked at some web resources and it some mention bringing in java strings? I'd ideally not like to use java as i want to learn the core...
  42. K

    Average Array: Limit of Average Terms?

    Is limit of an array average of its terms?
  43. H

    Managing a Huge Array on a Unix/Linux System

    My array is big. No, bigger than that. It's big! I'm writing a C++ program on a unix box (or is it linux? I never notice the difference), and I want to operate on a very large amount of data: more than 2^32 bytes. Do I have any options aside from writing my own code to manage a swap file...
  44. Math Is Hard

    C prog: printing values from array of structures

    Hello, I have a little function I have written that takes an array of structures as an argument void print_names(struct pers_info arr[]) { printf("Here is person 1: %d %s %s %s\n", arr[0].ssn, arr[0].pers_name.first,arr[0].pers_name.middle, arr[0].pers_name.last); printf("Here...
  45. Mk

    Could someone explain to me array notation

    Could someone explain to me "array notation" I found it here, but I still don't understand it. Though I probably don't need to know it, I want to. Also, will I encounter this anywhere else? http://members.aol.com/hedrondude/array.html
  46. Math Is Hard

    How can I declare an array of pointers to arrays of characters in C?

    I am not sure I wrote this correctly, but I am trying to declare an array of 12 pointers to arrays of 50 characters: char *names[12] [50] Does this look OK? Thanks.
  47. D

    Why is my mergesort function only working for arrays up to three items?

    I'm not sure that this post belongs here, but I'll give it a try. I'm having a devil of a time :devil: trying to figure out why my program won't work. The assignment was to create and array class consisting of: A constructor that takes and integer for the size of the array A constructor...
  48. K

    Why do we use two channels in MICRO ARRAY analysis ?

    Why do we use two channels in MICRO ARRAY analysis ?? LIke red and Green ?? What does the ratio between red/green signify ??
  49. russ_watters

    Improve WiFi Reception with Phased Array Antenna

    I moved into a new condo last week. It has concrete block walls and concrete floors and ceilings. Needless to say, the wireless reception is terrible. I bought two of http://www.hawkingtech.com/prodSpec.php?ProdID=183 - 90 degree directional antennas. They helped a little, but...
  50. P

    Electromagnetic Diagram of 4 Antenna Array - Philip's Question

    Just wondering if anyone happens to have an electromagnetic diagram of how a four antenna array would look. Provided that all four antennas’ form a square and edges are one wavelength in distance? Thanks Philip
Back
Top