A résolu


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

environ 5 ans il y a

A résolu


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

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

plus de 5 ans il y a

A résolu


Ratio between sum of primes and sum of factors
Write a function that calcualtes the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

plus de 5 ans il y a

A résolu


Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

plus de 5 ans il y a

A résolu


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

plus de 5 ans il y a

A résolu


Add two numbers
Add two numbers (For beginners)

plus de 5 ans il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

plus de 5 ans il y a

A résolu


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

plus de 5 ans il y a

A résolu


Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

plus de 5 ans il y a

A résolu


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

plus de 5 ans il y a

A résolu


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

plus de 5 ans il y a

A résolu


kmph to mps
convert kilometer per hour to meter per second

plus de 5 ans il y a

A résolu


square number
Square a number

plus de 5 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,...

plus de 5 ans il y a

A résolu


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

plus de 5 ans il y a

A résolu


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

plus de 5 ans il y a

A résolu


edge detection
write a function that gives the indexes of rising or falling edge x is a vector (assume it contains always at least one eleme...

plus de 5 ans il y a

A résolu


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

plus de 5 ans il y a

A résolu


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

presque 6 ans il y a

A résolu


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

presque 6 ans il y a

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

presque 6 ans il y a

A résolu


Split a given string from the first instance of a given character
A simple operation to split a given string into two substrings at the point where the desired character is first found. e.g. ...

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


most frequent character
Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

presque 6 ans il y a

A résolu


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA'

presque 6 ans il y a

A résolu


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

presque 6 ans il y a

A résolu


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

presque 6 ans il y a

A résolu


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

presque 6 ans il y a

Charger plus