I am currently doing some task on a website called Codility (link and bottom of post). The task basically ask for me to create an algorithm to shift an array to the left K times (Full details below). Which seem to work for a non function but I still seem to be shifting it wrong as the output is...
'Analyses of global histone modification patterns in ESCs have previously suggested that the ESC genome is subject to generalized histone acetylation and lysine 4 H3 methylation (H3K4me). As these are both transcription-activating modifications, these changes in global genomic architecture and...
I have a 4D array of dimension ##100\text{x}100\text{x}3\text{x}3##. I am working with `Python Numpy. This 4D array is used since I want to manipulate 2D array of dimensions ##100\text{x}100## for the following equation (it allows to compute the ##(i,j)## element ##F_{ij}## of Fisher matrix) ...
My question is: is the resolving power of an array of radio telescopes a quantum or a classical effect? The increase in resolving power of a single telescope, as aperture size increases, is easy to explain in terms of Heisenberg's uncertainty principle. But when we go an array of telescopes are...
I don't know much about batch, but what I want is to execute a command such as ping google.com -n 200 and store all 200 ping latency results to a variable. The default results (avg max min %lost) isn't enough for me to tell if I can do what I need to do. I would like to calculate the average...
I'm confused as to why this bubble sort I'm implementing is setting _all_ items to one of the items (I have no idea which one as array is too big)
the data type is of
...
[[1128 1026 1192 1023]]
[[ 771 195 858 196]]
[[ 953 1799 955 1738]]]
when I have an array of int, this same algorithm...
Hi all
I am working on beam forming of high frequency (>400 KHz) linear array for imaging sonar. I have gathered sensor data of 80 channel linear array sub merged halfway in 8 m deep water tank with a transmitting probe 6 m away from it at same depth. I recorded multiple pulses and perform...
Hello! I'm in the early process of brainstorming plans for a roof mounted mobile solar array as a DIY project. The host vehicle will be a 8.5'x20' cargo trailer. On the roof I can fit an array of 6x solar panels that is almost exactly 8.5x20. However, I actually want to create 3 such arrays...
Hello all,
I am in deep water here based on my very fundamental understanding of physics generally and solar design specifically.
I am 83 years, homeless, and have access to land with one building, wood heat, non-potable site water, and nothing else.
I want to make a PV system with an array...
Well, I'm trying to move a bit into modern Fortran, and I am more used to Fortran77 syntax.
So, for example, when I wanted to make an array whose two of its components equal another array of another dimension, I used to do something like this:
do k=1,N
do j=1,N
do i=1,N...
I was wondering if I placed an infinite number of light polarizers in an array, each rotating an infinitesimal amount from the next, would I be able to get 100% of the photons shun thru them on the other side?
Hi,
I am currently completing a Gold CREST Award on the Hyperloop Train, and when researching came across a technolofgy called Inductrack. I kind of understand the general concept behind it, however, there's this one paragraph I'm not too sure on and was wondering if someone could explain it...
Hi guys,
On with my Fortran adventures...I'm trying to accomplish a simple task: assign a 2D array with some reals. Here's an excerpt from the code:
subroutine get_energy_and_grad(natoms_,coords,ereal,gradmat)
include 'cbka.blk'
include 'opt.blk'
integer, intent(in) :: natoms_...
Hello,
Recently, a solar power tower plant was founded next to where I work.
Since it's the tallest object in the area, it's quite hard to miss it. But apart from that, every morning the reflected light is arranged in a hyperbolic- like way, as you can see in the picture.
Does anyone have a...
Homework Statement
Write a function that finds if three arrays of integers are identical. The arrays are identical when they have the same values at the same indices. Below are two samples outputs.
Homework Equations
N/A
The Attempt at a Solution
I decided to compare the arrays using a...
Homework Statement
A house has n x m rooms (n and m natural numbers, n>=2 and m>=2) and is represented as a 2 dimensional Array with n rows(0 to n-1)and m columns(0 to m-1).The room at line i( 0 <= i <= n-1) and column j ( 0 <= j <= m-1 ) is identified by the pair of numbers (i,j).All rooms...
I am developing a FORTRAN code (.f90) which "ll calculate some matrix in some time interval (dt1=0.001) and these matrices have to be integrated in some time steps (dt=0.1). Though I am experience in FORTRAN 77, new to FORTRAN 90. I am unable to make dimension of matrix real (I think that is the...
Hello,
i need help with my code please , i have a file named 'bic' which contain only 2 columns . I want to plot this two columns.
Data=importdata('bic.dat');
g=Data.data(:,2)
r=Data.data(:,1);
delta=r-g;
plot(r,delta,'b*');
And i have this error
struct contents reference from a non-struct...
Homework Statement
Write a sequence of statements to REVERSE the elements of array X1.
Homework Equations
-
The Attempt at a Solution
Here's my work :
Could somebody check my answer please ?
Homework Statement
Calculate the sum of all hight-order bytes in array NUM1 and store the sum in a memory location named newH. Define newH as needed.
Homework Equations
-
The Attempt at a Solution
INCLUDE Irvine32.inc
.data
NUM1 sword 1h,2h,3h,4h,5h,6h,7h,8h,9h,10h,11h,12h,13h,14h,15h,16h...
Hello all,
I have this piece of code in Python
from sklearn.datasets import load_iris
data = load_iris()
features = data['data']
feature_name = data['feature_names']
target = data['target']
target_names = data['target_names']
labels = target_names[target]
print(target.shape)#This outputs...
Homework Statement
Find the index corresponding to 0Hz on my RF spectrum vs frequency garph
Homework Equations
using np.argmax or np.argmin [/B]The Attempt at a Solution
np.argmin just gives the proof that the lowest value in frequency array plotted on x-axis is 0, but now i need to find the...
I have been debating with a friend about a thought experiment that evolved out of an entirely unrelated discussion, but which has now become a subject of argument.
Consider a "dual" phased array antenna that has every odd-numbered radiating element driven from input port 1 and every...
Hello,
I'm trying to allocate a bool[3^27] array of bits in a Linux system with 1,2TB swap partition but the system says Segmentation Fault. How could I do this ? Thanx.
Fair warning: I can handle basic physics stuff, but probably nothing post-collegiate. :)
Specifically, I'm looking for a primer on phased array radar that will tell me two things: 1) what are the practical physical (antenna) requirements for running a PAR system in the 800MHz/5GHz bands, and 2)...
I was supposed to write a program that has a while loop in which two people, person1 and person2 input a string. The program runs the loop until one of the people inputs "it's over". At that time the program should exit and print out the correspodance between these two people while they were in...
Homework Statement
Create two 5x5 arrays, A & B, and ask the person to fill them out. Save those numbers in matrix_a.txt & matrix_b.txt respectively. Then, save the sum and difference of those numbers in sum.txt & diff.txt respectively.
Basically we need to create two arrays, fill them out...
Hello,
I am having a hard time deciding the size of a solar array to boil water for a school project. Before putting any thought into the subject I simply thought that I would just take the wattage of the panels and add them up since they are added in both series or parallel and then select an...
Does anyone have any experience with the Hydrogen Epoch of Reionization Array project? I'm working on it over the summer, and I'd like to know what its like form someone who has done it.
I want to write a program that in the twodimensional array stores only capital and noncapital letters of the alphabet and the sign #. Everything else inputted cannot be stored in the array. How am i to do this in the easiest way?
I can think of only checking for each input if it exists in some...
I want to generate 500 numbers in an array but in order? For example I can generate 500 random numbers with this code but how will i be able to put it in order?
//code example
cout << "Generate 500 random numbers:" << endl;
const int nnn = 500;
int numberOfArray3[nnn];
for (i = 0; i <...
This is a homework problem, so I have to follow some stipulations, namely:
The problem is, I have no idea how to get a method to return a generic-type array. Because of type erasure, I can't create an instance T[] of a generic array, empty or otherwise.
The only way I was able to do it was...
Homework Statement
Using these two prototypes,
double minValue( const double a[], unsigned els);
double minIndex(const double a[], unsigned els);
I am supposed to find the smallest value of an array using the minValue function as well as it's index by using the separate minIndex function and...
I'm trying to solve https://www.hackerrank.com/challenges/equal which is how to make an array's N elements equal through operations restricted to (1) adding 1 to N-1 elements, (2) adding 2 to N-1 elements or (3) Adding 5 to N-1 elements.
I started out by writing some test cases that might be...
Homework Statement
Given n>=0, create an array length n*n with the following pattern, shown here for n=3 : {0, 0, 1, 0, 2, 1, 3, 2, 1} (spaces added to show the 3 groups).
Homework EquationsThe Attempt at a Solution
public int[] squareUp(int n) {
int length = n*n;
int[] completeArry...
Homework Statement
I am fairly new to C programming. I need to write a code that creates an array of max 300 numbers, ask the user to input the numbers and then print that array.
Homework Equations
3. The Attempt at a Solution [/B]
Here is my code
#include <stdio.h>
void main() {
int...
Hello,
I am stuck on this java problem. I was wondering if anyone can figure out what I am doing wrong. Thank you!
Problem
1. Given an array of ints, return true if there is a 1 in the array with a 2 somewhere later in the array.
ex: has12([1, 3, 2]) → true
has12([3, 1, 2]) → true...
Homework Statement
Compare two strings which represent test scores for a 20 question exam. If the student scores 15 or higher, they pass. Less than that they fail. Indicate whether a student passes or fails. Display how many answers they got right and wrong. Display which number they got wrong...
I don't know how to display what the string you see in the array. Do I need to put something in the paint method? It's annoying because my book and everywhere I look only show examples using integers and not strings.
This code is in the init method. I can't find out where to display the "dog"...
One of my professor's assignments is proving particularly tricky for me. It reads:
"Write the method
public static void sort(String[] a)
that sorts the array a in increasing order. The method must be
a short recursive program. Do not use quicksort or merge sort.
It should be a lot...
If someone can help me with this I'd be grateful. I've asked this question on other forums, gotten lots of views but no answer. It's no big deal but maybe someone has a solution.
I've have a program written in BASIC. I did not write the program and I have no way to contact the original...
This is a class assignment that has been puzzling me for a few hours. I need this to print out the values from the passenger array. My code so far prints the values from my aircraft class perfectly but not from my passenger class. Please see my output below:
How do I make the output display...
Here's the pseudo code:
for i := 1 to n { //i=1 and n=4
for j := i to n { //j=1
B[i][j] := 0
for k := i to j {
B[i][j] := B[i][j] + A[k]
}
}
}
This is what i understand from the code above - B values are from the sum of a values.
I want to know what the values of...
So, I already understand that the maximum resolution of a radar system is λ R / L, where lambda is the wavelength, R is the range to the target, and L is the diameter of the antenna, and that for a phased array, L would be the maximum distance between antennas (correct me if I'm wrong :) ). But...
Homework Statement
Say that a "clump" in an array is a series of 2 or more adjacent elements of the same value. Return the number of clumps in the given array.
countClumps([1, 2, 2, 3, 4, 4]) → 2
countClumps([1, 1, 2, 1, 1]) → 2
countClumps([1, 1, 1, 1, 1]) → 1
Homework Equations
The logic is...
My question stems from the Cosmic-1 satellites using single antennas for radio occultation and the cosmic-2 sats that will use a phased array antenna.
I've done a fair amount of research in regards to the phased array antenna. Overall it seems to improve the signal to noise ratio when making...
Hello. I'm looking for a "simple" FFT processor able to process an 8 bits input in an array of at least 512 pts with a speed of at least 20 MHz. I've precised "simple" instead of certain TI DSP with up to 196 pins ! I only need FFT nothing else. Does it exist ? Thanks by advance for replies.
I am trying to create a phase sweeper at 31.4KHz(and constant 5V) for a small antenna array that consists 2 antennas. If I can create 2 signals with a frequency difference < 1Hz it's okay too(It will be nearly same) as long as I can control that difference because I need to change phase at a...
I am attempting to find the numbers above the average number of a set of numbers in an array. I am having trouble understanding why my output for the list of numbers above the average is so...weird. I'd appreciate the help!
My code:
public class Inequality
{
public static void main(String[]...