Arrays Definition and 145 Threads
-
R
Can a DIY bolometer be used to create an IR viewer for aircraft?
How is a pixel array read, such as in a LED TV, digital camera, microbolometer, etc. All of these things have an array of pixels that either transmit or receive. Each pixel must be read somehow, is this done with a multiplexer and do you need more and more multiplexers the more pixels you...- rppearso
- Thread
- Arrays Pixel
- Replies: 29
- Forum: Electrical Engineering
-
J
Find the median of two sorted arrays
Well ... I completely failed that job interview. That was one of the programming questions. He said I answered it completely wrong.- Jamin2112
- Thread
- Arrays Median
- Replies: 15
- Forum: Programming and Computer Science
-
F
Is there a library for table arrays?
Hello For a software on which we are currently working we need a .net library for reading/writing array of data tables from/to relational databases. Is there such a library for .net? Tunc- finaquant
- Thread
- Arrays Table
- Replies: 4
- Forum: Programming and Computer Science
-
U
Basic arrays, not sure if i'm right
Homework Statement First of all, i wrote this code but i can't seem to get xcode to work on my mac and i'll only get to school in 2 days time, while this needs to be completed before school! I'm using xcode on Mac, programming language C. Here's the question: (a)Using a for loop...- unscientific
- Thread
- Arrays
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
Comp Sci How to Use a While Loop with Arrays in C++?
Homework Statement Homework Equations The Attempt at a Solution #include <iostream> #include <cstdlib> using namespace std; using std::cout; int main() { int sum=0; int Array[] = {1,2,3,4,42,5,6}; // int Array[] = {42,1,2,3}; // int Array[] = {12,-10,42,10}; // int...- Biosyn
- Thread
- Arrays C++ Loop
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
V
Programming in C question. Printing Arrays
Homework Statement Alright, I actually solved this problem myself, it is just ugly and hilariously inelegant. I won't lose points since it is an introductory course, and it technically works, but I wondered what the "right way" to do this is. Here is what I had to do. Create an array where...- Vagabond7
- Thread
- Arrays Printing Programming
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
A
C Programming: Dynamic allocation of 2D arrays using an array of pointers.
Homework Statement Ok, I'm learning C programming and I'm trying to create a dynamic 2D array. This is the code that seems to work in creating a dyamic array. I found it in a book. //rows and cols are values entered by the user when the program runs. int **(matA) =...- ashwinnarayan
- Thread
- 2d Array Arrays C programming Dynamic Pointers Programming
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
F
Dot product between arrays: basis representation of an image
Hello Forum, When we represent a vector X using an orthonormal basis, we express X as a linear combination of the basis vectors: x= a1 v1 + a2 v2 + a3 v3+ ... Each coefficient a_i is the dot product between x and each basis vector v_i. If the vector x is not a row (or column vector)...- fisico30
- Thread
- Arrays Basis Dot Dot product Image Product Representation
- Replies: 2
- Forum: Linear and Abstract Algebra
-
N
Comp Sci Find primes using sieve of erasthothenes by way of bit arrays in C++
Hey. I have to create a program in C++ to calculate the number of prime numbers up to a specified number. I also have to print out the first and last 5, but I'll cross that bridge when I come to it. I can do this fine with integers, but we have to do it where each slot in an array represents...- necromanzer52
- Thread
- Arrays Bit C++ Primes
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
L
MATLAB Producing arrays to plot (MATLAB)
Hi everyone, my code is a little rusty and a work in progress but I was wondering how I would go about producing arrays for the calculations performed in the while loop for the analyses so they can be plotted. I have the following parameter input; G0 = 50; v = 0.25...- Liffner
- Thread
- Arrays Matlab Plot
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Java JavaScript arrays and loops combination question
var lost = [4, 8, 15, 16, 23, 42]; var count = lost.length; var isLost = function (n) { for (i=lost[0]; i<count; i=lost[i+1]) { if ( n === lost[i]) { return "true"; } } return "false"; }; is it possible to in corporate array positions into the for loop? (i) do...- mindauggas
- Thread
- Arrays Combination Javascript Loops
- Replies: 3
- Forum: Programming and Computer Science
-
S
F90 arrays in namelists w/o abc(2,3)=44.4 notation
I wrote a program that writes arrays in a namelist under MinGW in Win7. The array is 100x2. It is written in two columns, alf(*,1) and then alf(*,2), where * means 100 row elements. It puts out the name of the array followed by a lot of numbers without any alf(1,1), alf(2,1), ..., alf(1,100)...- solarblast
- Thread
- Arrays Notation
- Replies: 5
- Forum: Programming and Computer Science
-
P
Adding/Subtracting arrays in F77
Hey, I'm new to fortran and I don't know how to add arrays. I opened a data file and assigned a different array to each number but if I type something like x(2)+x(3) it will not yield a result. This is probably a stupid question but thanks for any help you can offer.- PCSL
- Thread
- Arrays
- Replies: 10
- Forum: Programming and Computer Science
-
A
Fortran How Can You Efficiently Store and Update Data in FORTRAN Arrays?
Dear Sir, I am using FORTRAN. I have little experience and i am facing one problem. I want to store data (i.e. X and Y values) in an array (A(900),B(900)) in such a way that at first I used only 30 elements of each array for storage 30 initial values of X and Y and then I have some...- amitavorc2
- Thread
- Arrays Data Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
C/C++ Associative Arrays in C/C++ - Favorite Strategies?
Associative Arrays in C/C++ -- Favorite Strategies? I mean by that something like what Perl or Python or Ruby have, a.k.a. dictionary types. I can do it in Mathematica with the help of label[key] = value and Head and DownValues, but it's C/C++ where it is the most difficult of all. I once...- lpetrich
- Thread
- Arrays associative
- Replies: 7
- Forum: Programming and Computer Science
-
S
Algorithm Complexity: Sorted Arrays into Sorted Array
Homework Statement We have k >= 1 sorted arrays, each one containing n >= 1 elements (all equal length). We want to combine all of them into a single sorted array with kn elements. We have a "naive" algorithm: merge the first two arrays, then merge the third array into the result, then merge...- sodiumbromate
- Thread
- Algorithm Array Arrays Complexity
- Replies: 12
- Forum: Engineering and Comp Sci Homework Help
-
G
Comp Sci Java Class Arrays: ArrayTest Method
Homework Statement Create a Java class named ArrayTest with a method called arrayCombiner that creates three arrays of size 10. The first array should contain the values 1, 3, 5, 7, 9, 11, 13, 15, 17, and 19. The second array should contain the values 2, 4, 6, 8, 10, 12, 14, 16, 18, and 20...- glebovg
- Thread
- Arrays Class Java
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
N
MCNP Input of Voxel Arrays and Their Universes
Hi I have problems in mcnp input of voxels. I define a voxel arrays and their universes,for example universe1 is defined as: 2001 43 -1.030 -70 u=1 vol=6.795352 but in runing I have below error: fatal error.the surface type is not recognized: -1.03 While 1.03 is the density of...- njm
- Thread
- Arrays Input Mcnp
- Replies: 7
- Forum: Nuclear Engineering
-
E
Understanding Arrays and Their Role in Converting Light into Data
Hi all, I've been reading on how arrays (eg. EVLA) turn light from space into data, but I don't really get it. I know it has a lot to do with Fourier Transforms, but I can't find anything that gives a good and simple outline as to why they're used. And then once it's been transformed it needs...- EnSlavingBlair
- Thread
- Arrays Work
- Replies: 1
- Forum: Astronomy and Astrophysics
-
S
What is the electrical potential energy of a triangular charge configuration?
Homework Statement Derive and simplify an expression for the electrical potential energy of the charge configuration. It's an equilateral triangle with charges +q, -q and +q. Homework Equations Ep=Kq2/r The Attempt at a Solution I know how to do this with squares (it's basically...- stonecoldgen
- Thread
- 2d Arrays Charge
- Replies: 3
- Forum: Introductory Physics Homework Help
-
P
C: 2D arrays with structs and pointers
I wanted to make a variant on having a player just walking around a small 2d map. Instead of having 2 variables to store the current x and y values of the player position in a certain array, I want to make a 2d array that is filled with NULL pointers. Then the player would be represented as a...- Peter P.
- Thread
- 2d Arrays Pointers
- Replies: 6
- Forum: Programming and Computer Science
-
R
C# GORITHMS AND SOLUTIONS FOR LEARNING C# ARRAYS
Has anyone got any good problems with solutions that would be good for helping me learn about arrays in c#? Thanks AL- rollcast
- Thread
- Arrays
- Replies: 1
- Forum: Programming and Computer Science
-
M
Comp Sci FORTRAN Help: Using Functions and Arrays
Alright, so I've updated it once more... The only thing I need to do is figure out how to convert the functions x_data, y_data and choi_1 that store all 3 of the inputs I need for the main program and other functions. program calculator IMPLICIT NONE REAL :: addition, subtraction...- mattmac.nuke
- Thread
- Arrays Fortran Functions
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
M
How can I simplify my sorting class and user input for my TestStudent program?
I'm having issues with a sorting class that I'm trying to call from my main program, TestStudent. I don't think it's taking the user's input correctly when I try to read it into an array but I can't figure out why. class Student: public static void selectionSort(double[] numbers) {...- major_maths
- Thread
- Arrays Loops
- Replies: 1
- Forum: Programming and Computer Science
-
J
Fortran What could be causing a dynamic space array error in a Fortran 77 program?
Hi all I am trying to run an executable compiled from some Fortran files (not my own), which look like they are written in Fortran 77. One of these includes some dynamic space arrays, where the number of elements depends on an integer value passed to the subroutine, e.g. subroutine...- jf22901
- Thread
- Arrays Dynamic Fortran Space
- Replies: 5
- Forum: Programming and Computer Science
-
N
Matching orientations of 2-d arrays of values - using fft?
Matching orientations of 2-d arrays of values -- using fft? I was discussing the following problem (a subproblem of a personal project I'm working on) with a professor: we're given two 2-d arrays of values. We know them to be identical, but they might not be oriented corrected -- i.e., 0 0...- n00bot
- Thread
- Arrays Fft
- Replies: 2
- Forum: Differential Equations
-
S
Fortran Fortran 95 Reading in Multi-Dimensional Arrays
Hi. I have a file like this: 1990 01 01 0000 27 16 1990 01 01 0100 25 15 1990 01 01 0200 24 16 1990 01 01 0300 24 16 1990 01 01 0400 22...- Sam032789
- Thread
- Arrays Fortran Reading
- Replies: 4
- Forum: Programming and Computer Science
-
MATLAB Efficiently Use polyfit() on Arrays for Accurate Curve Fitting | MATLAB Guide
I have 2 arrays: vxb = 0.0001 0.0001 0.0001 0.0002 0.0002 0.0003 0.0003 0.0003 0.0003 0.0003 0.0003 0.0004 0.0005 0.0005 0.0005 0.0005 0.0006 0.0006 0.0006 0.0006 0.0006 0.0006 0.0007 0.0007 0.0007 . . . and...- Saladsamurai
- Thread
- Arrays
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
T
MATLAB How to Create a Multiplication Matrix in MATLAB?
Hi, I'm new to MATLAB and I have a problem: I am trying to create a multiplication matrix of sorts. The first row will have numbers from 0 to 1 in steps of .0101 The first column will have the same, from 0 to 1 in steps of .0101 Then to generate the rest I will multiple each entry in the...- twotaileddemon
- Thread
- Arrays Matlab Matricies
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
C/C++ C++ Help: Sorting with Arrays & Merging Strings
I'm working on programming my own sorting code in C++ using the divide and conquer algorithm. I'm a novice programmer and I've gotten a little stuck. Let's say you begin your code with an array of distances, dis[4] = {dis1, dis2, dis3, dis4} Then I want to separate this array into...- scumbum22
- Thread
- Arrays C++
- Replies: 3
- Forum: Programming and Computer Science
-
R
Inputting to Char Arrays from Keyboard - Linux/GCC
Hi,I have a question about C.I have declared two char arrays.I want to write one string through one line to take them first array.When ı touch enter and go to next line ,it will place my charecters which have been given later touching enter to second array.What can I do this? ,please help me...- rambo3131
- Thread
- Arrays Keyboard
- Replies: 11
- Forum: Programming and Computer Science
-
M
Fortran Solving FORTRAN 90 2D Arrays Program Pr2
program pr2 implicit none integer:: i,j real, dimension(21,80) :: istat open(7,file='sens.dat',status='old',action='read') read(7,*)((istat(i,j),i=1,21),j=1,80) write(*,*)istat end Where is the problem?Input file has 1680 values.But I get...- Milentije
- Thread
- 2d Arrays Fortran
- Replies: 6
- Forum: Programming and Computer Science
-
W
Fortran Help with declaring arrays in Fortran 90/95
I have an assignment to calculate the least squares fit line to a set of points, and I have to read in an arbitrary number of points from the user So my plan was to have the user enter how many elements they have, and then create an array with that many elements. So let's say I read the...- warfreak131
- Thread
- Arrays Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
J
Mathematica Mathematica and large data arrays
Hi, I have imported a data set from EXCEL that is 18 columns wide and 25 rows long. Each row of data appears within it own set of brackets as expected. I am able to pull out individual elements of the array. However, I want to plot column 2 vs column 4. How might I extract those two columns...- jd83605
- Thread
- Arrays Data Mathematica
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
T
Beginner VBA Help Using Arrays to find the lowest value from a list
Hi, I have this text file. "3 4 7.21 -5.7 0.01 9.0 5.6 0.11 -.123 14. 2.11 4.11 0.0001 -2. " I am trying to create a VBA program to find the Minimum value, but I keep getting an error. Could someone help me? I am trying to get some practice for a test. Here is what I have so far...- turkcyclone
- Thread
- Arrays Beginner List Value
- Replies: 2
- Forum: Programming and Computer Science
-
Distance on arrays of unit-quaternions
Hello, let's take the algebra of quaternions \mathcal{C}\ell_{3,0}^+ and consider only the sub-algebra of unit-quaternions. When we wanted to define a https://www.physicsforums.com/showpost.php?p=2911801&postcount=6" we used the fact that unit-quaternions lie on the \mathcal{S}^3 sphere...- mnb96
- Thread
- Arrays
- Replies: 1
- Forum: Linear and Abstract Algebra
-
V
Comp Sci Java: Solving the Arrays Dilemma
hello all, I was given an assignment on arrays, here is the task: Write a program that inputs an array of 10 integers from the user, and removes the duplicate array elements. You may assume that all the integers are between 0 and 100, and you may input them from the user however you wish. The...- Vintageflow
- Thread
- Arrays Java
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
C
Writing Assembly LC2 Program to Calculate Dot Products of Two Arrays
how to write an assembly program to calculate the dot products of two arrays ?? Thx Anyone know how to write an assembly program (source code) to calculate the dot products of two arrays with LC 2 ? Given: The size of each array is 15 (a[0],...,a[14] ; b[0],...,b[14]) that are stored in...- colourbox
- Thread
- Arrays Assembly Dot Program Writing
- Replies: 6
- Forum: Programming and Computer Science
-
V
Fortran Memory storage of multidimensional arrays in fortran 90
Hello, I think i heard somewhere that a multidimensional array in fortran 90 may be stored non-contiguously in memory. Is this true? Even if it the size was known at compile time? If your answer is it depends on a compiler, what about ifort and gfortran?- vacuum
- Thread
- Arrays Fortran Memory Multidimensional Storage
- Replies: 1
- Forum: Programming and Computer Science
-
D
MATLAB First time with matlab, inputting cell arrays into function?
Hi I am currently trying to program something that will accept a vector as input for one my function. However, this is my first time programming, and I am relying completely on the internet and the Chapra textbook for help. This is what I have so far: %Re=reynolds number %p = density of...- darkxynx
- Thread
- Arrays Cell Function Matlab Time
- Replies: 7
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
Creating & Populating String Arrays in C
I'm new to C, so this is probably a dumb question, but I'd appreciate help. If I create (or think I create, anyway) an array of strings with: char *array_name[10] and then try to populate an element of the array with: gets(array_name[0]) everything compiles ok, but I get a runtime...- jpatterson
- Thread
- Arrays String
- Replies: 4
- Forum: Programming and Computer Science
-
Y
Mathematica Declaring/filling arrays of arbitrary size in Mathematica
edit: Forgot to add Mathematica in the title. Sorry! Hi everyone. I mined a lot of data and want to analyze it in Mathematica. The data is of the form {{x11, y11, x12, y11, x13, y13},{x21, y21, x22, y22}...} meaning that each set of x,y pairs is not necessarily the same size...- yourgoldteeth
- Thread
- Arrays Mathematica
- Replies: 9
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
How Does a Pointer Behave Like an Array in C Programming?
So I'm learning C, and I think I'm doing pretty well so far. Anyway, I'm up to Arrays, and some code that was posted in the tutorial is this: #include <stdlib.h> int main() { int* myArray = malloc( sizeof(int) * 20 ); // could write int myArray[20]; instead. myArray[5] =...- Epic Sandwich
- Thread
- Arrays Pointers
- Replies: 16
- Forum: Programming and Computer Science
-
D
MATLAB Comparing multi-dimensional arrays- matlab
Comparing multi-dimensional arrays-- matlab So I need to be able to tell if these multi dimensional arrays have the same numbers using the all function and one logical operator: A = [ 5 6 8; 8 0 0]; B = [ 5 7 8; 8 0 0]; C = [ 5 7 8; 8 0 0]; I am stuck and can't figure out a way...- darthxepher
- Thread
- Arrays Matlab
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB MATLAB: cell arrays of function handles
Hello I am trying to store function handles in an array. First attempt was to do something like the following: for i = 1:5 r(i) = @(x) [grid(i) - x(1)*(x(2) + value(i))]; end So I would store 5 function handles, each one using the <5x1> vectors "grid" and "value". Result: Nonscalar...- mikeph
- Thread
- Arrays Cell Function Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
Pointers and multidimensional arrays in C
/* Demonstrates passing a pointer to a multidimensional */ /* array to a function. */ #include <stdio.h> void printarray_1(int (*ptr)[4]); void printarray_2(int (*ptr)[4], int n); main() { int multi[3][4] = { { 1, 2, 3, 4 }, { 5, 6, 7, 8 }...- AK2
- Thread
- Arrays Multidimensional Pointers
- Replies: 2
- Forum: Programming and Computer Science
-
S
Fortran Merging arrays in fortran 90/95
Hi, can someone help me with this one? I'm trying to merge several 1d-arrays into one 2d-array. Is there any intrinsic routine/function in fortran 90/95 to do so? I also thought of pointers. Can I assign a 2d-pointer to more than one object so I have a pointer array whose columns point to...- seneika
- Thread
- Arrays Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
M
Comp Sci C++; arrays and standard devation/variance?
--- Found solution. Nvm.- mathman44
- Thread
- Arrays Standard
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
A
Adding Arrays Together with Pointers in C
#include <stdio.h> #define K 10 int array1[K], array2[K]; int *ptr; int addarrays(int x[],int y[]); main() { int count; for (count = 0;count < K; count++) { puts("Enter numbers into array1"); scanf("%d", array1[count]); }...- AK2
- Thread
- Arrays Pointers
- Replies: 3
- Forum: Programming and Computer Science
-
J
PHP PHP Constant Arrays: Is It Possible?
I was wondering if was possible to create a constant array in php so it doesn't have to be reinitialized each time you enter a function. I guess one solution is to make it global but from a code maintenance perspective it makes since to put the array in with the function that uses it.- John Creighto
- Thread
- Arrays Constant Php
- Replies: 1
- Forum: Programming and Computer Science