Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


Adding Numbers
Add the input numbers to the original.

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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.

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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 ]

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Mehr laden