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...
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
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...
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...
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...
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) =...
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)...
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...
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...
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...
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)...
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.
Homework Statement
Write a MIPS assembly language program that accomplishes the following tasks:
1. The program will prompt the user to enter an Integer between 1 and 10.
If the entered number doesn’t satisfy the above condition, use a loop and prompt the
user for a new entry (until a valid...
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...
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...
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...
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...
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...
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...
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...
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...
Dear fellows,
I am trying to plot a 3D graph, determining the x and y values using an array and the z values using if/else. This is the code I am playing with but I can't get it to work:
xmin=-1000;
xmax=1000;
division=1.0;
num=((xmax-xmin)/division)+1;
for i=1:(num/2)...
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...
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)
{...
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...
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...
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...
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...
Hi Matlab community and clever people
I desperately need help in matlab.
My data are stored as cell arrays (1x48 cells). Each cell contains 5 cells {1,1}, {1,2}...{1,5}.
Cells {1,1} contains image name and {1,3} contains onsets time.
I need to create a simple matrix in MATLAB with 6...
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...
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...
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...
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...
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...
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...
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...
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...
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?
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...
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...
1. Homework Statement
Hi I'm using C and I need to use arrays on this one, but I need to somehow randomize the output.2. Homework Equations
for example an output "abcde" could also have an output "bcade" possible
3. The Attempt at a Solution
#include <stdio.h>
main()
{
char word[27]...
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...
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] =...
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...
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...