Community Profile

photo

Ruihu Zhu


Last seen: 2 years ago Active since 2020

Statistics

All
  • First Answer
  • Solver

View badges

Content Feed

View by

Answered
I am getting a matrix dimensions must agree error on line 22. Can someone see what is wrong?
f1,f2,and f3 are vectors. So, multiply * should be dot multiply .*

3 years ago | 0

Solved


Trace the path of a harmful chemical in an ecological network
An ecological network consists of the cycles of nature, such as the water cycle, the carbon cycle, the oxygen cycle, etc. Due to...

3 years ago

Solved


Pitting corrosion on a metal plate: Find the largest pit
You are given an N x M matrix of _ones_ and _zeros_, which represents an image of a rectangular metal plate taken from the hull ...

3 years ago

Solved


Pitting corrosion on a metal plate: Count the number of pits
You are given an N x M matrix of _ones_ and _zeros_, which represents an image of a rectangular metal plate taken from the hull ...

3 years ago

Solved


Find an optimal placement of coolers on a grid
In a certain chemical plant, 6 new pieces of cooling equipment (coolers) are to be installed in a vacant space. This vacant spac...

3 years ago

Solved


Find an overlap in the cleaning schedule of two tank reactors
In a certain pharmaceutical production company, there are two tank reactors operating simultaneously and independent of each oth...

3 years ago

Solved


Assess the scatter of wind turbines in a field
The renewable energy industry is on the rise in many countries--- and one of the key players is wind energy. It is believed ...

3 years ago

Solved


Design a tubesheet for shell-and-tube heat exchangers
<<https://3.bp.blogspot.com/-kLSbhcCoT2I/WJIh-QVGLGI/AAAAAAAADEs/svvMzBqn4fUfI1rTCCH7Uw-QuDvxx0PxACLcB/s1600/Screenshot_669.jpg>...

3 years ago

Solved


Create a matrix map of increasing safety levels
The sole nuclear power plant at Grid City suddenly had a meltdown. Luckily, the plant was designed to be in full automation, so ...

3 years ago

Solved


Count the number of folds needed to pack a large sheet
In a certain paper factory, large sheets of paper are being made every day. Before sending the sheets for shipment, they have to...

3 years ago

Solved


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

3 years ago

Solved


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

3 years ago

Solved


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

3 years ago

Solved


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

3 years ago

Solved


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

3 years ago

Solved


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

3 years ago

Solved


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

3 years ago

Solved


Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

3 years ago

Solved


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

3 years ago

Solved


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

4 years ago

Solved


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

4 years ago

Solved


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

4 years ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

4 years ago

Solved


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

4 years ago

Solved


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

4 years ago

Solved


DNA N-Gram Distribution
Given a string s and a number n, find the most frequently occurring n-gram in the string, where the n-grams can begin at any poi...

4 years ago

Solved


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

4 years ago

Solved


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

4 years ago

Solved


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

4 years ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

4 years ago

Load more