Resuelto


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

alrededor de 8 años hace

Resuelto


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

alrededor de 8 años hace

Resuelto


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

alrededor de 8 años hace

Resuelto


subtraction of two nos
given a and b, subtract and give the answer

alrededor de 8 años hace

Resuelto


Adding Numbers
Add the input numbers to the original.

alrededor de 8 años hace

Resuelto


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

alrededor de 8 años hace

Resuelto


Perfect square.
Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

alrededor de 8 años hace

Resuelto


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

alrededor de 8 años hace

Resuelto


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

alrededor de 8 años hace

Resuelto


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

alrededor de 8 años hace

Resuelto


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

alrededor de 8 años hace

Resuelto


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

alrededor de 8 años hace

Resuelto


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

alrededor de 8 años hace

Resuelto


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

alrededor de 8 años hace

Resuelto


first element of matrix
find the first elements of a column matrix

alrededor de 8 años hace

Resuelto


Sum of integers numbers
Sum of the numbers from 1 to 100

alrededor de 8 años hace

Resuelto


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

alrededor de 8 años hace

Resuelto


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

alrededor de 8 años hace

Resuelto


Find the sum of n squares
What is the sum of the squares of the first n integers?

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

alrededor de 8 años hace

Resuelto


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Resuelto


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

alrededor de 8 años hace

Resuelto


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

alrededor de 8 años hace

Resuelto


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

alrededor de 8 años hace

Cargar más