已解决


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

8 months 前

已解决


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

8 months 前

已解决


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

8 months 前

已解决


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

8 months 前

已解决


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

8 months 前

已解决


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

8 months 前

已解决


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

8 months 前

已解决


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

8 months 前

已解决


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

8 months 前

已解决


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

8 months 前

已解决


Jack O'Lantern
If visualized correctly, the data contained in the matrix A will look like a jack-o'-lantern. Create a function that will visu...

8 months 前

已解决


3D Plots and Colorbars
Use the matrices X, Y, and Z provided in the function template to create a surface plot. Add a colorbar to the surface plot and ...

8 months 前

已解决


Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...

8 months 前

已解决


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

8 months 前

已解决


Reproduce this plot!
Write a function that will take a dataset (x,y), a best fit model (model), and the upper and lower prediction bounds (lb,ub) for...

8 months 前

已解决


Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...

8 months 前

已解决


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

8 months 前

已解决


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

8 months 前

已解决


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...

8 months 前

已解决


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

8 months 前

已解决


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

8 months 前

已解决


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

8 months 前

已解决


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

8 months 前

已解决


Total energy

8 months 前

已解决


Potential energy calculation

8 months 前

已解决


Kinetic energy calculation

8 months 前

已解决


Laws of motion 6

8 months 前

已解决


Laws of motion 5

8 months 前

已解决


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

8 months 前

已解决


Laws of motion 3

8 months 前

加载更多