A résolu


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

plus de 7 ans il y a

A résolu


prime test 2
enter the only non prime,non composite number

plus de 7 ans il y a

A résolu


Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

plus de 7 ans il y a

A résolu


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

plus de 7 ans il y a

A résolu


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

plus de 7 ans il y a

A résolu


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

plus de 7 ans il y a

A résolu


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

plus de 7 ans il y a

A résolu


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

plus de 7 ans il y a

A résolu


Sort complex numbers into complex conjugate pairs
Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

plus de 7 ans il y a

A résolu


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

plus de 7 ans il y a

A résolu


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

plus de 7 ans il y a

A résolu


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

plus de 7 ans il y a

A résolu


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

plus de 7 ans il y a

A résolu


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

plus de 7 ans il y a

A résolu


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

plus de 7 ans il y a

A résolu


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

plus de 7 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 =...

plus de 7 ans il y a

A résolu


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

plus de 7 ans il y a

A résolu


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

plus de 7 ans il y a

A résolu


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

plus de 7 ans il y a

Réponse apportée
Saving a value from matrix B, indexed by matrix A
Hi, you can use a *for loop* for B like this: for i=1:numel(B) ... end Then, determine the index by A, like this...

plus de 7 ans il y a | 1

| A accepté

A résolu


Second Diagonal
Transpose the matrix from it's second diagonal.

plus de 7 ans il y a

A résolu


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

plus de 7 ans il y a

Problème


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

plus de 7 ans il y a | 3 | 86 solveurs

A résolu


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

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

Charger plus