Array Definition and 481 Threads
-
P
Need help initialising a 2D array
Hello everyone, I have a newbie Matlab question. I need to set up a 2D array 'phi' whose gradient is an identity mapping in terms of the spatial coordinate. So, basically I have a 2D image and what I want to do is set up phi at each pixel (x, y) as follows: phi(x, y) = 0.5 * (x^2 +...- pamparana
- Thread
- 2d Array
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Help w/BWR Array: Guide Rods/Tubes in 8x8 Assembly
On a typical 8 x 8 BWR assembly which slots would contain guide rods, or instrumentation tubes?- MuonSchmloun
- Thread
- Array
- Replies: 1
- Forum: Nuclear Engineering
-
A
LaTeX [latex] enumerate list colliding with equation array
So I have a list like \begin{enumerate} \item asdfasdfasdf \item asdfasdfasdf \item \begin{align} equation here \end{align} \end{enumerate} I want to put an equation array to center and give some space around the equation, otherwise it looks all cluttered. I keep getting...- Ai52487963
- Thread
- Array Latex List
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
C
Fortran Increase of array memory in gfortran compiler
Dear colleagues My code in Fortran passes all data in one large vector. I increased the size of this vector for the maximum that the compiler accepts but still need more positions allocable to it. Is there any way I can increase the memory allocation of the compiler? Thank's- Cleiton
- Thread
- Array Compiler Gfortran increase Memory
- Replies: 1
- Forum: Programming and Computer Science
-
F
How to pass array element form a subroutine to main function
Hi guys. I want to transfer each elements of an array (which is declared in one subroutine)to main function using common block technique. When i am doing so i go always a constant value in the array in the main function. Suppose i have one array bparz(i) which has different values in one...- FZK
- Thread
- Array Element Form Function Subroutine
- Replies: 14
- Forum: Programming and Computer Science
-
J
Powering LEDs: Array of 168 LEDs, 120V AC, 25mA, 2.8V Forward Bias
Hey, so I have a large array of LEDs. I think I have 168 of them. I want to power them from my wall in the US (120V AC). The forward bias for each LED is 2.8V. The current rating is 25mA. I plan to arrange them in chains of about 42 to get 117.6V drop over all the LEDs. That leaves me with...- jgordo32
- Thread
- Array Led Led array
- Replies: 27
- Forum: Electrical Engineering
-
Shifting Array in C: Solving Last Element Problem
Hi, i would like some help with this task. My task is to write a function that shifts an array arbitrary number of steps. So for example the array { 0,1,2,3,4,5,6,7,8,9 } would look like { 9,0,1,2,3,4,5,6,7,8 } after the function was called with the steps arguments set to 1. The...- James889
- Thread
- Array
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
How Can We Make Matrices More Tangible for Struggling Engineering Students?
At present I introduce matrices as an array of numbers and then carry out various matrix operations. Is there a more tangible way of introducing this topic? I have thought of transformations but my experience with students has been that they get lost in the transformations and so give up on...- matqkks
- Thread
- Array Matrices Numbers
- Replies: 2
- Forum: STEM Academic Advising
-
A
Fortran Fortran: creating array containing characters
Hello. I'd like to create an array containing characters (basically a word stored as a 1xn array). I have no idea how to do this, however. I thought that the most obvious way to do it (yes, it would've been highly impractical for long words) was to write character, dimension(3) :: A...- _Andreas
- Thread
- Array Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
F
Fresnel Lens Array - Focal Point Question
Hello, all, I am using 9 fresnel lenses (~1x1' per lens) and 9 water blocks for a solar water heater. Each fresnel lens is positioned so that a water block below is heated. A pump is used to pump the water through the system. However, I have one question... I have all of my fresnel... -
L
How to Sort Word Frequencies in a C Program?
Homework Statement Develop a C program that to count how many times each word appears in a large text file. Your program must read words from a file and output the number of times each word of the file appears. 1. Implement an algorithm to count how many times each word appears in a large...- lynk26
- Thread
- Array Sorting
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
M
Swapping numbers in a multidimensional array
i'm trying to swap the 43 and the 435, but instead 435 is printed where 43 should be. #include <iostream> using namespace std; void print(const int matrix[][2]); void swap(int matrix[][2]); int main(){ int matrix[2][2] = {{14, 435}, {43, 65}}; print(matrix); cout << endl...- magnifik
- Thread
- Array Multidimensional Numbers
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
B
Solar declination / solar panel array design
I need some help, I am planning on installing a 10 kilowatt solar panel array in the next couple of months. I will not be using a solar tracking device. The plan thus far is to determine the solar south bearing and face the panels in that direction and work out an appropriate angle for the...- blimkie.k
- Thread
- Array Declination Design Solar Solar panel
- Replies: 2
- Forum: Astronomy and Astrophysics
-
N
Mathematica Mathematica: Function output to array
Hello everybody! I've got a Mathematica problem that I've been working on for a while but can't seem to solve. My code is pretty involved, so I'll simplify the dilemma for you. F1 := Function[{x,m,b}, y = m*x+b; Print[y] ] I have a function called F1. If I call it like...- noon0788
- Thread
- Array Function Mathematica Output
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Difference Between Array & Tuple for Large App
I am wondering if anyone can describe to me the correct use of a couple words. I am programming a very large application, and I like to name my variables so that they are very descriptive. Before I begin, I would like to know what is the difference between an array and a tuple? Are they the...- mikestampone
- Thread
- App Array Difference
- Replies: 8
- Forum: Set Theory, Logic, Probability, Statistics
-
M
Fix Dynamic Array Bug: Find the First Item Less than Preceding
this function is supposed to find the first item in an array that is less than the element preceding it, and set the p parameter to point to that item, so the caller can know the location of that item. when i run it.. it fails. there are probably multiple bugs.. any suggestions on how to fix...- magnifik
- Thread
- Array Bug Dynamic
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
E
MATLAB Matlab: how to use an array in a matrix
hi all.. I have a 2x2 matrix and an array , for example: a=linspace(0,12) %this is my frequency range. B=[2*a 3*a-1 a./2 a] this one does not results a 2x2 matrix, that I need it to have ...B2xB1xB how could i get a 2x2 matrix? should i use a loop instead of an array...- elham.n
- Thread
- Array Matlab Matrix
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
F
Infinite array of charged wires
In the Feynman Lectures, Volume II, Chapter 7, the final two pages (7-10 and 7-11), Feynman describes an infinite array of parallel charged wires and uses a Fourier series to solve for the field above them. He shows that the series can be expressed entirely in terms of cosine terms and that the...- Fr33Fa11
- Thread
- Array Charged Infinite Wires
- Replies: 3
- Forum: Electromagnetism
-
V
Comp Sci Comparing array of data is fortran
Hi FORTRAN experts, I have two arrays of data, called data1.dat and data2.dat. each contains 60 data. What I want to do is to compare the data in each file and write the counting into bins. It goes like this. First, take the first data in data1.dat file and compare with the 60 data in...- vjramana
- Thread
- Array Data Fortran
- Replies: 12
- Forum: Engineering and Comp Sci Homework Help
-
M
How to read this file line by line and store contents in an array
Hello, In my computational science class I have the task of taking the following input file and manipulating it. I have the following input file: C1 0 0.00 0 000.0 0 000.0 O2 1 1.22 0 000.0 0 000.0 H3 1 1.09 2 120.0 0 000.0 C4 1 1.54 2 120.0 3 180.0 H5 4 1.09 1 110.0 2...- missfangula
- Thread
- Array File Line
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
V
C/C++ Troubleshooting a Private Member Double Array in C++
I have been pulling my hair out on this one. I have a double** that is a private member of a class. The constructor declares and initializes it as a 2 dimensional dynamic array of doubles (an array of arrays). Then it sets every element of the array equal to 0 with a set of two nested for...- vociferous
- Thread
- Array C++ Member Troubleshooting
- Replies: 10
- Forum: Programming and Computer Science
-
G
MATLAB Matlab Problem structured array
Not sure if anyone here is familiar with MATLAB programming. I am supposed to create a structured array (resembling a game board) that acts as a predator/prey simulator. The user needs to specify the size of the game board. Within the gameboard I am supposed to represent a couple of different...- gpax42
- Thread
- Array Matlab
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
9
Help with Array: Evaluating Integral of sin(x)
What I need help with is the output. What should be our output? For example, [0, 1) ?- 999iscool
- Thread
- Array
- Replies: 5
- Forum: Programming and Computer Science
-
V
C/C++ Why Aren't My C++ Array Functions Working?
Have read a million different sites and threads, but still not getting anywhere (damn 1st year java makes addresses incomprehensible!). What changes do I need to make to get these c++ functions to work? //---------Functions //-- A function to increment the (n,m) element void...- villiami
- Thread
- Array C++ Function
- Replies: 10
- Forum: Programming and Computer Science
-
D
Scipy/numpy 2D array: how to define with a function?
I want to make a matrix of values as so: F(0,0) . . . F(1,n) . . . F(n,1) . . . F(n,n) I could of course do it like this list=[] for i in range(0,n): for j in range(0,n): list.append(F(i,j)) a=array(list) a.reshape(n,n) But I am curious if there is a more...- Dunhausen
- Thread
- 2d Array Function
- Replies: 3
- Forum: Programming and Computer Science
-
O
MATLAB Apply if/else if to each element in array in MATLAB
Hi! I have an array that is 1 column by many rows, of which each element represents a time. I want to find variable f at each time, where f is defined as follows: if t < tp f=(sin((pi*t)/(2*tp)))^2; if tp < t < ts f=(cos((pi*(t-tp))/(2*(ts-tp))))^2; otherwise f=0 I've tried...- oceanspiral20
- Thread
- Apply Array Element Matlab
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
Why is this highly distributed array a bad idea?
I once ran into a nobel-winning astronomer at a conference and suggested to him putting small internet-controlled telescopes for free (and fully supported) on a the roof of any household that wanted one. The telescopes would be controlled by "The Project" from a central server, and the "owner"...- jshrager
- Thread
- Array Distributed Idea
- Replies: 1
- Forum: Astronomy and Astrophysics
-
A
Comp Sci C++ Probability of Birthday Paradox for Room of 50 People
Homework Statement Write a program that approximates the probability that at least two people in a room of 50 people have the same birthday. Run 5,000 trials, count up the number at least two people have the same birthday, and divide by the number of trials to get a probability. Homework...- arkturus
- Thread
- Array C++ Issues
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
J
What is a hexagonal array and how is it transferred into different substrates?
I was reading a paper, and this term came up a lot. I have been searching for couple hours, and still cannot find a good source to explain this term. Anyone has any idea?- jwxie
- Thread
- Array
- Replies: 2
- Forum: Materials and Chemical Engineering
-
P
Locate maximum occuring element array in perl
guys..i need help... how to extract a maximum occurring element in array using perl... example... a[1]=11; a[2]=12; a[3]=13; a[4]=14; a[5]=15; a[6]=13; a[7]=14; a[8]=14; we will see that, 14 is the most occurring at element 8... how to know the no of frequently it...- paanz
- Thread
- Array Element Maximum
- Replies: 6
- Forum: Programming and Computer Science
-
D
How to Add a Vector to a 2D Array in Fortran 90?
hi. i have a quick question regarding fortran 90. i often need to add a vector to a 2d dimensional array, and i find it a bit to 'bulky' to always use do loops. let's say i have this: do i=1, 20 a(:, i)=a(:, i)+b(:) end do is there a simple(r) way to tell fortran that i want to...- dwnlder
- Thread
- 2d Array Vector
- Replies: 1
- Forum: Programming and Computer Science
-
S
Is there a positive integer solution to 1234x-4321y=1?
Homework Statement Find a positive integer solution to 1234x-4321y=1, both x and y will be positive. Homework Equations The Attempt at a Solution I created this array 4321 1234 619 615 4 3 1 3 1 1 153 1 1082 309 155 154 1 1...- scottstapp
- Thread
- Array Euclidean
- Replies: 5
- Forum: Calculus and Beyond Homework Help
-
B
Fortran Printing 1D array in Fortran as 2D array
Delete.. Delete..- BC2210
- Thread
- 1d 2d Array Fortran Printing
- Replies: 7
- Forum: Programming and Computer Science
-
S
Fortran90 How to take the power of elements of an array to, say, 5?
Hi all, as title, how to take the power of elements of an array to, say, 5? I know how to do it using loops, but would it be very troublesome if I have to do it a thousand times? Any ready made function in fortran90? I hope there is... I have googled it quite a bit, but seems nothing useful.- stevenphy2
- Thread
- Array Elements Fortran90 Power
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
O
How do i make a function return an array?
in the c++ programming language, how do i make a function return an array?- okkvlt
- Thread
- Array Function
- Replies: 2
- Forum: Programming and Computer Science
-
C
Help with C Homework: Array from 1D to 2D for 9 Cell Average
Homework Statement Need to write a 1 dimensional array in 2D so I can do operations on a 9 cell average. Here's what I've got so far #include <stdio.h> #include <stdlib.h> int main() { int dataArray[2]; int imax, jmax; FILE *fp; char buffer[4]; int...- Clint_Johnson
- Thread
- Array
- Replies: 12
- Forum: Engineering and Comp Sci Homework Help
-
T
Can a Portable Biochemical Testing Device Revolutionize Disease Management?
Hi all, I was thinking recently about insulin testing, and whether the convenience could be extended to other hormones and biochemicals in the body. For instance the thyroid molecules T3 and T4. It seems like a device capable of testing for the level of these molecules on the fly would be... -
A
Fortran Fortran 90 & elements array comparaison
Dear all, I'm trying to figure about an efficient way to to get the redundant element in my array. For instance, let's take the array [0,2,3,0]. I'd like to get out [2,0,3] (or 3,0,2 it doesn't matter). So it find out which element is duplicated, an puts its value in between the 2 other...- aihaike
- Thread
- Array Elements Fortran
- Replies: 3
- Forum: Programming and Computer Science
-
A
Fortran Fortran, complex array with rank one
I'm using the MATMUL command to multiplicate two arrays: array A is of rank one and has three complex elements, while array B is a 3x3 matrix with complex elements. However, the compilation is aborted because "the shapes of the array expressions do not conform". I'm pretty sure that the...- _Andreas
- Thread
- Array Complex Fortran rank
- Replies: 7
- Forum: Programming and Computer Science
-
A
MATLAB Extracting a Column from a 4D Double Array in MATLAB using Squeeze
Hello, I'd like to access a column of values from the 4th dimension of a 4D Double array in MATLAB and then save them to a new matrix. For example: A = rand(3,3,3,3); A(1,1,1,:) gives me: ans(:,:,1,1) = 0.7077 ans(:,:,1,2) = 0.0669 ans(:,:,1,3) = 0.7794 I...- afallingbomb
- Thread
- Array Matlab Multidimensional
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
MATLAB Creating an Array of X Values for Plotting a Function
I want to create a plot of a given function for all x values between negative infinite to negative R (for some given R value). How do I create an array for x so that my plot will include all the x values?- airelemental135
- Thread
- Array Function Plotting
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Excel VBAWriting a .txt file to an Array or Wrksht
[SIZE="5"]Go To Post #7 for new Question :smile: So let's that I have a .txt file called input.txt that simply contains the following: abc+123 I want to load input.txt using VBA into a 1-dim array called MyArray. I want each character to be an element of the array. That is a is...- Saladsamurai
- Thread
- Array Excel File
- Replies: 10
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
W
Learn How to Dim an LED Array with a Simple Circuit - No Switch Required!
Hi. I've got a LED dimmer circuit. When the dc power turns on, the LED will slowly lights up. There is a switch in the circuit that if I "open" the switch, the LED will slowly turns off. The million dollar question is how do I remove the switch and the LED will slowly turns off when the...- waterbottle
- Thread
- Array Led Led array
- Replies: 7
- Forum: Electrical Engineering
-
F
Keplerian scattering through an array of mass lumps
Hey guys, Hit a bit of a snag in something I'm working on and need some help. I've attached an image so hopefully that will help a bit. Basically I'm trying to model a mass m moving through a potential that is, currently, a grid of point masses and seeing how the overall distance traveled in a...- FunkyDwarf
- Thread
- Array Mass Scattering
- Replies: 2
- Forum: Astronomy and Astrophysics
-
S
Counting on a Rectangular Array
Homework Statement Suppose you have an a x b rectangular array of distinct integers (think of it as a matrix if you would like). Now suppose we first move across the columns and take a permutation of the entries in each column. Informally, we can imagine the integers in the array as cards, and...- snipez90
- Thread
- Array Counting Rectangular
- Replies: 2
- Forum: Calculus and Beyond Homework Help
-
H
MATLAB How can I use the find function to replace missing values in a 4D array?
Hi all- I have a question regarding using the find function as opposed to if statements in finding values in a 4D array. These are climate variables, such as temperature (in Kelvin). Missing values are represented as 10^15, and I want to change them to NaN which plots much nicer. I have...- Halsey
- Thread
- 4d Array Function Matlab
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
H
MATLAB MATLAB char array with variable names
Hello all. I am having troubles reading in data(from a .hdf file) and giving it my own variable names. I have created a character array var_names with the names I wish to use. The .hdf variables are 3D and 4D (they are climate parameters). What I am trying to do is loop through the...- Halsey
- Thread
- Array Matlab Variable
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
R
Debugging C Program for Outputting Array Elements
C programme ? Homework Statement /* Program-8.4 */ #include <stdio.h> int main() { int marks[5]= {89, 45, 73, 98, 39}; printf("%d\n", marks); //memory addres pointed by pointer printf("%d\n", &marks[0]); //memory address of 1st element printf("%d\n", *marks)...- rclakmal
- Thread
- Array Debugging Elements Program
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
M
Fortran Loading 2D array files to Fortran variables
Hi, I have created data files by compiling and running a c++ code. Now I need to open and store the contents of these files in Fortran 77 variables. But I am not able to do this. The read command does not return the values stored in the file. The files are having some 2003 lines and 53...- mrz1982
- Thread
- 2d Array files Fortran Variables
- Replies: 12
- Forum: Programming and Computer Science
-
N
How Do Photon Journeys Affect Light Clock Synchronization in Relativity?
I asked this question in an earlier thread, but I have thought a bit more about it and would like to add to it, hopefully focussing more successfully on the bit the bothers me. First some preparation: At first, I was thinking of two light clocks set in motion relative to an observer A but at...- neopolitan
- Thread
- Array
- Replies: 12
- Forum: Special and General Relativity