Risolto


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

quasi 4 anni fa

Risolto


only input
Return the output without writing any code into the function.

quasi 4 anni fa

Risolto


frame of the matrix
Given the matrix M, return M without the external frame.

quasi 4 anni fa

Risolto


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

quasi 4 anni fa

Risolto


select the primes of a vector
Find the prime numbers in a vector

quasi 4 anni fa

Risolto


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

quasi 4 anni fa

Risolto


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

quasi 4 anni fa

Problema


Fibonacci Weights ↧ ↧ ↧↧ ↧↧↧ ↧↧↧↧↧

quasi 4 anni fa | 3 | 10 risolutori

Risolto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

quasi 4 anni fa

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

quasi 4 anni fa

Risolto


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

quasi 4 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 4 anni fa

Risolto


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

quasi 4 anni fa

Risolto


Double the length of the vector

quasi 4 anni fa

Risolto


Half the length of the vector

quasi 4 anni fa

Risolto


Seperate 2nd column in a matrix

quasi 4 anni fa

Risolto


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

quasi 4 anni fa

Risolto


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

quasi 4 anni fa

Risolto


Find the value of Y

quasi 4 anni fa

Risolto


行列内の素数の平均をとろう
行列が与えられたときに、その行列内の素数の平均を計算する関数を作成しましょう。 例: 入力の行列が in = [ 8 3            5 9 ] のとき、 出力が 4 あるいは (3+5)/2 のようになり...

quasi 4 anni fa

Risolto


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

quasi 4 anni fa

Risolto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

quasi 4 anni fa

Risolto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

quasi 4 anni fa

Risolto


Create a vector
Create a vector from 0 to n by intervals of 2.

quasi 4 anni fa

Carica altro