Statistiche
0 Problemi
70 Soluzioni
RANK
N/A
of 289.736
REPUTAZIONE
N/A
CONTRIBUTI
0 Domande
0 Risposte
ACCETTAZIONE DELLE RISPOSTE
0.00%
VOTI RICEVUTI
0
CONTRIBUTI
0 Post
CONTRIBUTI
0 Pubblico Canali
VALUTAZIONE MEDIA
CONTRIBUTI
0 Punti principali
NUMERO MEDIO DI LIKE
Feeds
Risolto
Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...
oltre 9 anni fa
Risolto
Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...
oltre 9 anni fa
Risolto
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...
quasi 10 anni fa
Risolto
Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5
quasi 10 anni fa
Risolto
Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...
quasi 10 anni fa
Risolto
Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise
quasi 10 anni fa
Risolto
Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...
quasi 10 anni fa
Risolto
Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!
quasi 10 anni fa
Risolto
Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.
quasi 10 anni fa
Risolto
Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...
quasi 10 anni fa
Risolto
Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];
quasi 10 anni fa
Risolto
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,...
quasi 10 anni fa
Risolto
Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...
quasi 10 anni fa
Risolto
Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...
quasi 10 anni fa
Risolto
All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0
quasi 10 anni fa
Risolto
Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...
quasi 10 anni fa
Risolto
Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.
quasi 10 anni fa
Risolto
Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product
quasi 10 anni fa
Risolto
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...
quasi 10 anni fa
Risolto
Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...
quasi 10 anni fa
Risolto
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
quasi 10 anni fa
Risolto
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];
quasi 10 anni fa
Risolto
Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...
quasi 10 anni fa
Risolto
Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...
quasi 10 anni fa
Risolto
Get the length of a given vector
Given a vector x, the output y should equal the length of x.
quasi 10 anni fa
Risolto
First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];
quasi 10 anni fa
Risolto
Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...
quasi 10 anni fa
Risolto
Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.
quasi 10 anni fa