Array Definition and 481 Threads
-
P
Spatial Filtering 2d numpy array with a 3x3 mask
I have large 2d matrices from dicom files that i wish to filter with a 3x3 mask. the image arrays are of varying size and are padded with one border of zeros for the edge handling of the mask. i need to iterate over every element in the array and multiply it by the mask. I've done it in SciLab...- ProPatto16
- Thread
- 2d 3x3 Array Numpy
- Replies: 3
- Forum: Programming and Computer Science
-
P
Python Extracting 2d array from numpy.pixel_array dicom image
Hi guys, I have a dicom image from a QC spect acquisition. reading the file in with dicom.read_file and pulling pixel data using numpy.pixel_array gives array of shape [2, 1024, 1024] The 2 represents two images, one from each detector head on the spect scanner and the 1024x1024 are the...- ProPatto16
- Thread
- 2d Array Image
- Replies: 2
- Forum: Programming and Computer Science
-
J
Arrange N into a two-dimensional array
Homework Statement The problem is to show that arranging N into the two dimensional array: \begin{matrix} 1 & 3 & 6 & 10 & ... \\ 2& 5& 9& ... \\ 4& 8& & \\ 7&... & & \\ ... \end{matrix} leads to a proof that the union of an infinite number of countably infinite sets is countable...- jack476
- Thread
- Array
- Replies: 3
- Forum: Calculus and Beyond Homework Help
-
Runge-Kutta 4th order program copying array element
Hello, thanks for your interest in may help me, i appreciate it, really. My question is, I've wrote this code to solve an physical EDO system. But for some reason it copies the element k[1][3] at k[2][3]. After i call the initials elements the code becomes: for ( int n=1 ; n<=1; n++ ){...- Leonardo Machado
- Thread
- Array Computational Computational physics Element Program Runge-kutta
- Replies: 2
- Forum: Programming and Computer Science
-
K
Magnetic field direction on Halbach array?
Hi, hopefully someone here can help me! I'm interested in Halbach Arrays and specifically I want to make a circular array in which the field is amplified away from the array (as in above or below it), not to its inner diameter (or exterior circumference). Is this possible? On the web I've seen...- kodachrome
- Thread
- Array Direction Field Halbach array Magnetic Magnetic field Magnets
- Replies: 5
- Forum: Electromagnetism
-
S
Finding all the "move combinations" to partition an array
of size N into an K subgroups. I've been trying for hours to do this and still haven't found a solution. Example: The array {A,B,C} of size N=3 and I want all the move combinations that make it into K=1 subgroups. The only such subgroup is the one with all the elements, and I can get that with...- SlurrerOfSpeech
- Thread
- Algorithms Array Combinations Partition
- Replies: 4
- Forum: Programming and Computer Science
-
L
Python Finding specific points in data array
I have this really noisy data and I'm wanting to plot Temperature v. Time. I used this function to calculate a moving average. Here's some sample code. BA1='ANP-Heat-BA1.csv' #Time Trial 1 time1=pd.read_csv(BA1,skiprows=0) time1=time1['Time(s)'] #Temperature tmp1=pd.read_csv(BA1,skiprows=0)...- lee403
- Thread
- Array Data Points Specific
- Replies: 2
- Forum: Programming and Computer Science
-
S
Java Java- Printing an Original Array while Performing Operations on an Array Copy
Hello mathhelpboards community! Please help! Thank you. :-) I need my code to print out the user's original array that is to say the numbers in the way the user entered them. I tried making a copy of the original array and then did all of the arithmetic on it. I sorted the array copy in...- smilesofmiles
- Thread
- Array Java Operations Printing
- Replies: 4
- Forum: Programming and Computer Science
-
I
MATLAB Transforming part of matlab code to Fortran90
Here are my Fortran codes: program test implicitnone integer*4 nxProjPad, cf, numViews, cc, index, indRad, iv, i, INDEX1, d, n real*4 v4, v5, RSS, S1, F1, gMDL real*4, dimension(:), allocatable :: array, sum, cumsum, transpose, log, SS1, SSs nxProjPad=185 numViews=180...- i_a_n
- Thread
- Array Code Fortran90 Functions Matlab Matlab code Variable
- Replies: 8
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
JavaScript Algorithm to return all subarrays of a given array
I can't find this exact algorithm anywhere on the internet. What I'm trying to implement is the following function // Returns all subarrays of the given array, not including the empty array // ex. [a,b,c].subarrays() = [ [a], [b], [c], [a,b], [a,c], [b,c], [a,b,c] ] Array.prototype.subarrays...- SlurrerOfSpeech
- Thread
- Algorithm Array
- Replies: 8
- Forum: Programming and Computer Science
-
MATLAB How can I append new columns to an existing Excel file with MATLAB?
I would like to ask how to use MATLAB to append new columns into existing excel file without altering the original data in the file? In my case I don't know the original number of columns and rows in the file and it is inefficient to open the files one by one and check in practice. Another...- kelvin490
- Thread
- Array Column Columns Excel Matlab Matrix
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
K
Orthogonal array for DOE by using the Taguchi method
Hi in my project their are three variables like speed ,depth of cut and feed and each variable have 5 values then please tell me which Orthogonal array is suitable for my design of experiments by using taguchi method And tell me detailed Thank you- karna soma shankar
- Thread
- Array Doe Orthogonal
- Replies: 1
- Forum: Mechanical Engineering
-
LaTeX How to Control Equation Numbering in an Equation Array?
I need help with this equation array. \begin{align} \bra{+}\hat{H}\ket{+}&=\frac{1}{2}(\bra{e}+\bra{o})\hat{H}(\ket{e}+\ket{o})\\ &=\frac{1}{2}(\bra{e}\ket{e}E_e+\bra{e}\ket{o}E_o+\bra{o}\ket{e}E_e\\ &+\bra{o}\ket{o}E_o)\\ &=\frac{1}{2}(E_e+E_o). \end{align} I just want it...- kq6up
- Thread
- Array
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Replace NaN with next element in Multidimensional Array
I have a a multidimensional array (49x49x49) which has NaN values scattered randomly. For each NaN, I want to replace the value with the previous non NaN value. e.g. if i had a 3 x 3 matrix 4 7 9 2 7 NaN 1 2 NaN should become 4 7 9 2 7 7 1 2 2 I have 3 dimensions [i,j,k], but...- Ben Wilson
- Thread
- Array Element Matlab Multidimensional
- Replies: 10
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
O
MHB Trouble Printing Out Array Elements with a For Loop
I am having problems with printing out each elements of the array using a for loop It's suppose to look like this: Enter non-negative numbers (ints) terminated by -99 1 2 3 4 5 6 -99 Original list (6 values): 1, 2, 3, 4, 5, 6. the code's output looks like: Enter non-negative numbers (ints)...- osu3124
- Thread
- Array Elements Loop Printing
- Replies: 1
- Forum: Programming and Computer Science
-
B
Basic question about Halbach magnet array
Can a magnetic Halbach array have less than three (i.e. two) magnets in the array? I can't seem to figure this out quickly with google. TIA!- berned_you
- Thread
- Array Magnet Magnets
- Replies: 7
- Forum: Electromagnetism
-
Fortran How to Write a 2D Array to a .dat File in Fortran90?
Hello everybody, I have a source code which gives me as a result an array of 2 columns and 3001 rows (2d array). By using fortran90. I was trying to have the values inside these cells into .dat file and tried to generate a subroutine and call my main array inside this. But somehow I get...- abdulsulo
- Thread
- 2d Array File
- Replies: 11
- Forum: Programming and Computer Science
-
C
C/C++ Normalize Array w/ C++ & Max of 60 x's
I need to normalize an array, I find the max value which can be any integer. I have to output this number using cout and represent it as 'x' how ever many times. The catch is I can only have a max amount of 60 x's. If my max is 500 I need to display it as 60 'x' and normalize my whole array to...- Colton0117
- Thread
- Array C++ Normalize
- Replies: 2
- Forum: Programming and Computer Science
-
Y
F90 Subroutine that accepts any array of any dimension
Hi, I need to write a subroutine that accepts as an argument an array of any number of dimensions, where each dimensions has any size. The array is contiguously allocated. In C, I can do this pretty cleanly. void array_func(int ndims, int *dims, int *array) { // do stuff with...- Yascho Bob
- Thread
- Array Dimension Subroutine
- Replies: 6
- Forum: Programming and Computer Science
-
S
Text file that is read into an array
I have a program "probe.f90" that reads in a text file. It runs. I am having trouble reading in the second text file (when prompted by user). How could I turn this bit of code into a function? I was thinking about a function that strips the header from the fasta file. Then read into an...- Sue Parks
- Thread
- Array File Text
- Replies: 33
- Forum: Programming and Computer Science
-
V
Magnet moving over surface creating levitation
Hi, I've been doing reading on Halbach Arrays moving over surfaces and generating repulsive forces. From my understanding, the moving magnet induces a circular electric current in the metal track, which gives rise to a magnetic field. However, I'm having trouble understanding why this field...- vidur27
- Thread
- Array Current Electricity Levitation Magnet Surface
- Replies: 3
- Forum: Electromagnetism
-
S
MHB Finding duplicates in a user defined array using a function
Hello, I'm extremely new to C++ and will appreciate any help you would be willing to offer. I need to create a function that will find the duplicate characters in a string and then when a duplicate is found, it will break out of the search loop and print the position of the character that was a...- smilesofmiles
- Thread
- Array Function
- Replies: 5
- Forum: Programming and Computer Science
-
S
Fortran Fortran 90: Display values in an array
I have a program that calculates the Fibonacci numbers from 1 to 100. The program runs fine. I am not sure how to take my output and display them in an ARRAY. Any ideas? I tired to pass the array variable through the equation, but my output was weird. I would have 1, 1, 3347...- Sue Parks
- Thread
- Array Fortran
- Replies: 13
- Forum: Programming and Computer Science
-
T
Microchannel Array etching in Stainless Steel Metal Search
Hi All! Haven't been here for some time, the changes are looking good! Anyway, formalities aside, I am having serious problems sourcing and implementing a suitable stainless steel (Grade: 304; thickness: 0.3mm) substrate for my etching process. I'm currently working on developing a...- That Neuron
- Thread
- Array Etching Material science Micro Microfluidics Search Stainless steel Steel
- Replies: 1
- Forum: Materials and Chemical Engineering
-
S
How to show if a given array of numbers is a vector?
Homework Statement I'm reading Zee's book Einstein Gravity, I'm in the section where he said that given an array of two numbers p=(ap1, bp2), it is not a vector unless a=b. He just stated it without really showing how it must be like that. I know that a vector should satisfy a transformation...- shinobi20
- Thread
- Array General relativity Linear algebra Numbers Vector
- Replies: 2
- Forum: Advanced Physics Homework Help
-
I
Infrared LED array for heating?
We have LED arrays for visible lighting. What problems exist for using infrared LED arrays as a heat source for humans, like those in a residential settings? Does effectiveness vary much by wavelength and skin color, clothing worn, etc? Thanks. :-)- IsleVegan
- Thread
- Array Heating Infrared Led Led array
- Replies: 7
- Forum: Thermodynamics
-
D
Arbitrary array of numbers, proof
Homework Statement The numbers 1 to 25 are arranged in a square array of five rows and five columns in an arbitrary way. The greatest number in each row is determined, and then the least number of these five is taken; call that number s. Next, the least number in each column is determined, and...- Daltohn
- Thread
- Array Numbers Proof
- Replies: 7
- Forum: Precalculus Mathematics Homework Help
-
S
How can I print a formatted array of factorials from 1-100 without errors?
I have a list of factorials from 1 -100. I can print them to the console without a format problem. I used the kind() function for formatting the output. I have tried to put these numbers into an array, but I get an error when I try to print the array PRINT *, FACTORIALS (F) 1 Warning: Legacy...- Sue Parks
- Thread
- Array
- Replies: 11
- Forum: Programming and Computer Science
-
V
USB Battery Array -> Power 36v Motor
I'd like to take several of these (or similar) usb device charging batteries (http://www.ianker.com/product/A1271011 ) and connect them into an array to create a minimum of 36V and channel that to power a speed controller for an electric vehicle. Is this possible? Would I be able to prototype...- vanillabass
- Thread
- Array Battery Motor Power Usb
- Replies: 3
- Forum: General Engineering
-
J
4000w LED Chip Array Driven Directly by Mains
Hi folks. I'm currently designing a 4000w LED chip array in which I plan on using 3x 1500w 12v switch mode power supply's. A DC-DC converter will convert the 12v to 35v powering two chips. This totals to 20 step up converters and 3 switch mode power supplies to drive the proposed 40 100w chips...- Justin18
- Thread
- Array Led Mains Power supply
- Replies: 2
- Forum: General Engineering
-
Why an array of telescopes is used?
To increase the resolution of an instrument, smaller wavelength and larger aperture is desirable. It is mentioned in some textbooks that the "effective" diameter of a telescope can be increased by using arrays of smaller telescopes. I just wonder why it is possible because every telescope is...- kelvin490
- Thread
- Array Astronomical telescope Diffraction Optics Resolution Telescope Telescopes Telescoping series
- Replies: 16
- Forum: Other Physics Topics
-
R
Harness Sea Wave Energy: Focus Waves w/ Diffraction & Floating Breakwaters
Would it be possible to use diffraction to focus the enrgy of sea waves, on the principle of the zone plate (https://en.wikipedia.org/wiki/Zone_plate) but reduced to 2 dimensions? This could be done by an array of wave-opaque objects such as floating breakwaters, particularly along coasts...- Rayner
- Thread
- Array Diffraction Focus Generation Power Wave Waves
- Replies: 5
- Forum: Earth Sciences
-
Fortran Fortran90-How to allocate an array dimension
Hi, I have a problem with a code I'm working with. I'm a student in physics and I'm writing a code in Fortran 90 that should calculate the Polonium's half-life time. I have no data to work with so I generated them with the library random number and here is the problem, I have a 300 lines code...- Aner
- Thread
- Array Dimension
- Replies: 8
- Forum: Programming and Computer Science
-
3x3 patch antenna trasmission line designing problems
Hello, I'm currently engaged on a project where I need to design a 3x3 rectangular patch antenna array operating 1.5~5.8GHz on FR4 h=1.6mm substrate. I've studied the single element design and some TL matching techniques like the quarter wavelength but I can't put together a 3x3 elements...- Enio
- Thread
- 3x3 Antenna Array Designing Line
- Replies: 13
- Forum: Electrical Engineering
-
Solar array arrangement calculation method (not due south)
Hi all, First time post, long time lurker, sorry if this is in the wrong section. I am currently looking at a project that requires a large solar panel array onto a very tight roof area; maximising space is therefore important. Thus, keeping the panels as close together is important. I have a...- Foxyquik
- Thread
- Array Calculation Method Solar
- Replies: 6
- Forum: General Engineering
-
What is phased array head and neck coil in MRI?
I was reading this article " The Effect of Head Rotation on the Geometry and Hemodynamics of Healthy Vertebral Arteries" They used an MRI machine with a phased array head-neckcoil and a phased array superficial coil. what are they?- makkhi
- Thread
- Array Coil Head Mri
- Replies: 1
- Forum: Biology and Medical
-
J
How to Maximize Battery Life in LED Arrays?
I'm making an array of 11 3.3V LEDs, and I've got multiple various setups possible depending on source voltage (batteries supplying either 6V, 9V, or 12V) and whether I decide to put a bunch of the LEDs in a combination of series/parallel or all in parallel. I need to maximize battery life, so...- JPrice
- Thread
- Array Led Led array Leds
- Replies: 9
- Forum: Electrical Engineering
-
B
Implicit recursive array construction, F90
Hello there, I again have a problem with programming in Fortran 90.1. Homework Statement I would like to construct an array with an implicit do loop. I know how to get the array I want to with usual do-loop but I would like to do it without do loops. So this is the array I want to construct...- Boltzmann
- Thread
- Array Construction Implicit
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
M
Rotating an Array: Seeking Help with Maths Skills
Rotate an array hi everyone I'm hoping someone maybe able to help me/ point me in the right direction with the rotation of data from an array. I'll try to keep it short but my maths skills are seriously not good due to my old age and inexperience. I maybe approaching it from the wrong angle and...- MM2758
- Thread
- Array Rotating Skills
- Replies: 2
- Forum: General Math
-
Python [Python] Function pointers & array of objects
Maybe I am going about this the wrong way. I'm trying to build a form to display & update information in a object. The objects are stored in an array since I'll have 1-N of them. What I've done now is created an array of dictonaries which hold the information about the form fields, it...- cpscdave
- Thread
- Array Function Pointers Python
- Replies: 6
- Forum: Programming and Computer Science
-
J
Solar updraft tower: How small a working unit can be made?
solar updraft tower: How small a working unit can be made? My reason to ask this question is: I think that if a commercial unit is ever to be built, first the concept must be widely established. One or two working examples of a size similar to the prototype built in Spain won't likely prove...- jab
- Thread
- Array Solar Tower Unit
- Replies: 5
- Forum: General Engineering
-
H
Fortran Fortran - passing unknown array to subroutine
Im trying to pass an unknown size of array to the subroutine. Then I will define the size of array in subroutine and pass it back to main program. I tried to use interface but the complier said invalid memory reference or Explicit interface required for ' ' at (1): allocatable argument . Any...- hobmarcus
- Thread
- Array Fortran Subroutine
- Replies: 5
- Forum: Programming and Computer Science
-
L
Current density uniformity electrode array
Hi All, I'm working on a research project that requires putting an electrode array with 4 elements into a flexible tube filled with conductive liquid. The electrode array is a series of balls, with the first being positive and the last being negative. The idea is to measure the change in...- leonhart88
- Thread
- Array Current Current density Density Electrode Uniformity
- Replies: 1
- Forum: Electromagnetism
-
D
Python [Python] Importing csv files and creating numpy arrays
So I am fairly new to Python and feel somewhat comfortable with it. I am trying to do something what I think seems kind of simple however am not too experienced with loading files into Python (or any programming language for that matter). What I am trying to do is I have csv files that contain...- dcrisci
- Thread
- Array Arrays Csv files Numpy Python
- Replies: 2
- Forum: Programming and Computer Science
-
A
MATLAB MatLab: array of numbers unequal distribution
I want to create an array of numbers between 0 and 0.1 where the points are clustered around an arbitrary point x1 (0 < x1 < 0.1). I want the points to get exponentially closer together near x1 from either side and and get further apart towards the outer limits. I am using MatLab and was trying...- AnneElizabeth
- Thread
- Array Distribution Exponential distribution Matlab Numbers
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
How to change a two-dimensional array print into normal?
Homework Statement I made a two-dimensional array program, but now I need some help to alter the program in the print zone. The Attempt at a Solution import sys students = [] grades = [] while True: student = input ("Enter a name: ").replace(" ","") if...- acurate
- Thread
- Array Change Normal Python
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
R
Comp Sci Java: Reading a file into an array
Homework Statement How do I read in a file line by line into an array without using arraylist? Homework Equations NoneThe Attempt at a Solution I know how to do this using BufferedReader, but I am wondering how to do this using Scanner? When I used BufferedReader I noticed that there must...- Robben
- Thread
- Array File Java Reading
- Replies: 10
- Forum: Engineering and Comp Sci Homework Help
-
Fortran {FORTRAN}How can i read blank steps without using iostat
hello, I have a tricky question with arrays involved. I am trying to made a code who can read precipitation, so i have 3 kinds of strings: 1.numbers, 2.0 ,3. blank steps. I need to change the blanks into the smallest number who can read fortran. I was reading and the other options is using...- camila
- Thread
- Array Fortran
- Replies: 6
- Forum: Programming and Computer Science
-
Comp Sci Fortran:store loop value in array
Homework Statement My program calculates the value of a function. Then it prints them on the screen. This is the part: do while(x<=b) variablesvalues(1)=x x=x+delta call recog_variables (func, variables) answer=evaluate(variablesvalues) print*, answer end do What I need to do now is to save...- Antonija
- Thread
- Array Loop Value
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
T
Synchronize a dc pulse through an array of parallel wires
Hi everyone, my question is related to producing a magnetic field from an array of straight parallel wires. In my scenario, imagine the wires as being stacked into a regular array similar to the way a pile of lumber is usually stacked, so that the ends are exposed, eg: ====================...- trini
- Thread
- Array Dc Parallel Pulse Wires
- Replies: 11
- Forum: Electrical Engineering