Solved


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

mer än 10 år ago

Solved


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

mer än 10 år ago

Solved


Return area of square
Side of square=input=a Area=output=b

mer än 10 år ago

Solved


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

mer än 10 år ago

Solved


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

mer än 10 år ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

mer än 10 år ago

Solved


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

mer än 10 år ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

mer än 10 år ago

Solved


kmph to mps
convert kilometer per hour to meter per second

mer än 10 år ago

Solved


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

mer än 10 år ago

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

mer än 10 år ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

mer än 10 år ago

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

mer än 10 år ago

Solved


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

mer än 10 år ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

mer än 10 år ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

mer än 10 år ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

mer än 10 år ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

mer än 10 år ago

Solved


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

mer än 10 år ago

Solved


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

mer än 10 år ago

Solved


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

mer än 10 år ago

Solved


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

mer än 10 år ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


COUNT VOWEL 2
The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

mer än 10 år ago

Solved


COUNT VOWEL
Count, how many times vowels occurred. EXAMPLE: x='string the MaTLaBiAn' then the answer will be 6. x='coUnt the vowEl' th...

mer än 10 år ago

Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

mer än 10 år ago

Load more