A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 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;

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


Potential Energy
Calculate the potential energy of a rock.

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

A résolu


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

environ 9 ans il y a

Charger plus