Gelöst


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

mehr als 8 Jahre vor

Gelöst


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

mehr als 8 Jahre vor

Gelöst


Day counter function
Write a function called _day_counter_ that returns the number of Mondays that fell on the first day of the month in a given year...

mehr als 8 Jahre vor

Gelöst


Dial Up
Each number on telephone keypads, except 0 and 1, corresponds to a set of uppercase letters as shown in this list: 2 ABC, 3 DEF...

mehr als 8 Jahre vor

Gelöst


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

mehr als 8 Jahre vor

Gelöst


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

mehr als 8 Jahre vor

Gelöst


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

mehr als 8 Jahre vor

Gelöst


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

mehr als 8 Jahre vor

Gelöst


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

mehr als 8 Jahre vor

Gelöst


Goldbach's marginal conjecture - Write integer as sum of three primes
Goldbach's strong conjecture states that every even integer greater than 2 can be expressed as the sum of two primes. For exampl...

mehr als 8 Jahre vor

Gelöst


convert the number to binary format & count digits
Convert the given number to the corresponding binary format and count the number of digits in that binary number

mehr als 8 Jahre vor

Gelöst


P-smooth numbers
This Challenge is to find <https://en.wikipedia.org/wiki/Smooth_number P-smooth number> partial sets given P and a max series va...

mehr als 8 Jahre vor

Gelöst


Champernowne Constant
The <http://en.wikipedia.org/wiki/Champernowne_constant Champernowne constant> is a real number whose digits in decimal represen...

mehr als 8 Jahre vor

Gelöst


Try your chance!!!
There is a bomb in 3 cell! You must avoid to select the bomb. choose one of these cells and try your chance: 1 2 3 ?...

mehr als 8 Jahre vor

Gelöst


Code breaker, Part I: Operation Phoenix
You have been tasked with decoding a set of coded messages that have been intercepted. Based on previous intelligence that ...

mehr als 8 Jahre vor

Gelöst


Guess the number I'm thinking of
In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

mehr als 8 Jahre vor

Gelöst


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

mehr als 8 Jahre vor

Problem


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

mehr als 8 Jahre vor | 7 | 57 Lösungsvorschläge

Gelöst


The twelve days of Christmas
Traditionally there are twelve days of Christmas to celebrate ("Twelvetide"), typically starting with Christmas Day (25 December...

mehr als 8 Jahre vor

Gelöst


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

mehr als 8 Jahre vor

Gelöst


The other half of the Fibonacci sequence
The <http://mathworld.wolfram.com/FibonacciNumber.html "Fibonacci sequence"> — F = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...

mehr als 8 Jahre vor

Gelöst


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

mehr als 8 Jahre vor

Gelöst


Find the average of a random sequance
Write a function that generates random integers within a loop, and calculates the mean of the positive numbers only. At each ...

mehr als 8 Jahre vor

Gelöst


How to reverse spdiags ?
The spdiags function extracts all nonzero diagonals from the m-by-n matrix A. So if A=[1 2 3;4 5 6;7 8 9], spdiags(A)=[7 4...

mehr als 8 Jahre vor

Gelöst


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


Perimeter of a quadrilateral
There are four cars starting at a point. The first car points north, the second one points east, the third one points south, an...

mehr als 8 Jahre vor

Gelöst


Happy Free March!
Just submit your solution in any March. *Related Challenges:* # <https://www.mathworks.com/matlabcentral/cody/problems/445...

mehr als 8 Jahre vor

Gelöst


Read it !
read and return the following word. 'M M A TTTTTTTTTL A BBB ' 'MM MM A A T L ...

mehr als 8 Jahre vor

Gelöst


2) Are you more familiar with iteration methods or Linear Algebra ? Let's see together.
Referring to problem: https://www.mathworks.com/matlabcentral/cody/problems/44530-are-you-more-familiar-with-iteration-method...

mehr als 8 Jahre vor

Mehr laden