Resuelto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

alrededor de 9 años hace

Resuelto


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

alrededor de 9 años hace

Resuelto


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

alrededor de 9 años hace

Resuelto


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

alrededor de 9 años hace

Resuelto


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

alrededor de 9 años hace

Resuelto


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

alrededor de 9 años hace

Resuelto


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

alrededor de 9 años hace

Resuelto


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

alrededor de 9 años hace

Resuelto


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

alrededor de 9 años hace

Resuelto


Sudoku square
We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

alrededor de 9 años hace

Resuelto


Convert from integer to binary
if true % decimalToBinaryVector(x) end

alrededor de 9 años hace

Resuelto


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

alrededor de 9 años hace

Resuelto


Change matrix to vector2
From x = 4 3 5 1 5 1 To y = 4 3 5 1 ...

alrededor de 9 años hace

Resuelto


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

alrededor de 9 años hace

Resuelto


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

alrededor de 9 años hace

Resuelto


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

alrededor de 9 años hace

Resuelto


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

alrededor de 9 años hace

Resuelto


Was ist denn los?
Nur für deutschsprechende Leute! Wie geht's? ...also gut, bis bald!

alrededor de 9 años hace

Resuelto


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

alrededor de 9 años hace

Resuelto


cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


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;

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

alrededor de 9 años hace

Resuelto


Potential Energy
Calculate the potential energy of a rock.

alrededor de 9 años hace

Resuelto


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

alrededor de 9 años hace

Resuelto


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

alrededor de 9 años hace

Resuelto


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

alrededor de 9 años hace

Resuelto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

alrededor de 9 años hace

Resuelto


if
if value n is larger than or equal to 100, return true, else false.

alrededor de 9 años hace

Cargar más