A résolu


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

environ 5 ans il y a

A résolu


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

environ 5 ans il y a

A résolu


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

environ 5 ans il y a

A résolu


UICBioE240 2.1
This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows th...

environ 5 ans il y a

A résolu


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

environ 5 ans il y a

A résolu


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

environ 5 ans il y a

A résolu


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

environ 5 ans il y a

A résolu


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

environ 5 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 ...

environ 5 ans il y a

A résolu


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

environ 5 ans il y a

A résolu


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

environ 5 ans il y a

A résolu


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

environ 5 ans il y a

A résolu


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

environ 5 ans il y a

A résolu


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

environ 5 ans il y a

A résolu


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

environ 5 ans il y a

A résolu


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

environ 5 ans il y a

A résolu


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

environ 5 ans il y a

A résolu


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

environ 5 ans il y a

A résolu


UICBioE240 problem 1.2
Convert a column vector into a row vector. So if A = [1; 2; 3] Then B = [ 1 2 3]

environ 5 ans il y a

A résolu


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...

environ 5 ans il y a

A résolu


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

environ 5 ans il y a

A résolu


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

environ 5 ans il y a

A résolu


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

environ 5 ans il y a

A résolu


Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

environ 5 ans il y a

A résolu


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

environ 5 ans il y a

A résolu


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

environ 5 ans il y a

A résolu


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

environ 5 ans il y a

A résolu


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

environ 5 ans il y a

A résolu


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

environ 5 ans il y a

A résolu


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

environ 5 ans il y a

Charger plus