Solved


Min by mean
Substitute the minimum value in each row of a matrix A by the mean of that row (it should also work if the input is a vector)

5 years ago

Solved


~(*|/)
Return three quarters of n without using addition, subtraction, multiplication or division.

5 years ago

Solved


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

5 years ago

Solved


Find the area of a triangle having vertices (A,B), (C,D), and (E,F)
Find the area of a triangle using if we have the three vertices of the triangle

5 years ago

Solved


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: a=[3 4 5]; b=[...

5 years ago

Solved


The Ulam Matrix
The Ulam spiral is simple to describe. On a gridded piece of paper, write down the number 1. Then write successive integers as y...

5 years ago

Solved


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

5 years ago

Solved


Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

5 years ago

Solved


Slope of the line passing through two points
Determine the slope of a line passing through the points a=[x1 y1] and b=[x2 y2].

5 years ago

Solved


Equal temperament - musical notes and frequency
Starting from 440Hz note (musical note A above middle C), create 13 notes, using twelve-tone equal temperament, in Herz units. ...

5 years ago

Solved


Second Diagonal
Transpose the matrix from it's second diagonal.

5 years ago

Answered
how to calculate the probability of an event with monte carlo simulation
mycode() function mycode() n=1000; x=zeros(n,1); y(1)=1.5 ; y(2)=1.5 ; for i= 1:n for t= 3:100 y(t)=0.6*y(t-1)+0.4...

5 years ago | 0

| accepted

Solved


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

5 years ago

Solved


Archimedes principle
According to Archimedes principle, the buoyancy force is equal to the weight of fluid displaced by the submerged portion of an o...

5 years ago

Solved


Volume of a Simplex
Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

5 years ago

Solved


Edges of a n-dimensional Hypercube
Return the number of edges on an <http://en.wikipedia.org/wiki/Hypercube _n_-dimensional hypercube> (with an integer n &ge; 0). ...

5 years ago

Solved


Calculate the CIRCUMFERENCE of circle.
Given the radius is 2, the circumference will be 12.5663.

5 years ago

Solved


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

5 years ago

Solved


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

5 years ago

Solved


Sum two real numbers
It seems easy, but... You cannot use +, -, plus, diff, cumsum, *, prod, times, etc.

5 years ago

Solved


Wien's displacement law
Given the black body temperature (in *Celsius*), output the weavelength (in *meters*) at which the radiation peaks, according to...

5 years ago

Solved


Create and Transpose Matrix

5 years ago

Solved


Subtract two numbers

5 years ago

Solved


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

5 years ago

Solved


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

5 years ago

Solved


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

5 years ago

Solved


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

5 years ago

Solved


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

5 years ago

Solved


Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....

5 years ago

Load more