A résolu


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

plus de 11 ans il y a

A résolu


Parse string and identify specific string sequence in algebraic equation
Given a string S that defines an algebraic expression such as: S= 'X= A1 + A2*(Y1 + A3*Y3)*exp( A4*Y12 + Y1) ;' return a...

plus de 11 ans il y a

A résolu


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

plus de 11 ans il y a

A résolu


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

plus de 11 ans il y a

A résolu


Four quadrant inverse tangent function.
Create a function that returns an array P the same size as X and Y containing the element-by-element, four-quadrant inverse tang...

plus de 11 ans il y a

A résolu


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

plus de 11 ans il y a

A résolu


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

plus de 11 ans il y a

A résolu


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

plus de 11 ans il y a

A résolu


Generate pi using logarithm
Generate pi using logarithm

plus de 11 ans il y a

A résolu


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

plus de 11 ans il y a

A résolu


Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

plus de 11 ans il y a

A résolu


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

plus de 11 ans il y a

A résolu


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

plus de 11 ans il y a

A résolu


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

plus de 11 ans il y a

A résolu


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

plus de 11 ans il y a

A résolu


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

plus de 11 ans il y a

Question


adding every element of an array with every element of another array?
dear all, i want to add array elements to every other element of another element of another array in simulink/matlab

plus de 11 ans il y a | 4 réponses | 0

4

réponses

A résolu


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

plus de 11 ans il y a

Problème


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

plus de 11 ans il y a | 3 | 300 solveurs

A résolu


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

plus de 11 ans il y a

Problème


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

plus de 11 ans il y a | 3 | 428 solveurs

A résolu


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

plus de 11 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

plus de 11 ans il y a

A résolu


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

plus de 11 ans il y a

A résolu


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

plus de 11 ans il y a

A résolu


radius of a spherical planet
you just measured its surface area, that is the input.

plus de 11 ans il y a

A résolu


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

plus de 11 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

plus de 11 ans il y a

A résolu


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

plus de 11 ans il y a

A résolu


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

plus de 11 ans il y a

Charger plus