A résolu


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

6 jours il y a

A résolu


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

6 jours il y a

A résolu


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

6 jours il y a

A résolu


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

6 jours il y a

A résolu


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

6 jours il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

6 jours il y a

A résolu


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

6 jours il y a

A résolu


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

6 jours il y a

A résolu


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

6 jours il y a

A résolu


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

6 jours il y a

A résolu


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

6 jours il y a

A résolu


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

6 jours il y a

A résolu


Find the standard deviation of non-zero elements in a matrix
Given a matrix A, calculate the sample standard deviation of only the non-zero elements. If there are fewer than 2 non-zero ...

6 jours il y a

A résolu


Problem Set 2
Make a calculator by the four main operators (op): + - * / And the two numbers (n1, n2). Don't forget to check to divisio...

9 jours il y a

A résolu


Problem Set 1
You will get the vector "v", you should put it's length in a variable called "lngth", then... If it's length from 1 to 5, sz = ...

9 jours il y a

A résolu


Switch-Case-Otherwise
You should make random numbers to 10, by 3 rows and 3 columns. Cases from 1 to 3, b = true. Otherwise, b = false.

9 jours il y a

A résolu


NOT
If a not equal to zero, b = true, else, b = false.

9 jours il y a

A résolu


OR
If a greater than zero or c less than 10, b = true, else, b = false.

9 jours il y a

A résolu


AND
If a greater than 0 and n less than 10, b = true, else, b = false. (Checking a should be in one line by AND special sign in MAT...

9 jours il y a

A résolu


Nested If(s)
If a greater than zero, then check, if a = greater that 1 and less than 10, then b = true, else, b = false.

9 jours il y a

A résolu


If-Elseif-Else
If a more than zero, b = true, if a = zero , b = zero, else, b = false.

9 jours il y a

A résolu


If-Else
If a more than zero, b = true, else, b = false.

9 jours il y a

A résolu


If
If a more than zero, then b = true.

9 jours il y a

A résolu


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

10 jours il y a

A résolu


James Bond film count
Twenty-three James Bond films have been produced, in the years 1962, 1963, 1964, 1965, 1967, 1969, 1971, 1973, ... 197...

11 jours il y a

A résolu


TRON strategy toggle
Detect whether your lightcycle is on same side of existing walls as opponents lightcycle. This function is useful in toggling a ...

11 jours il y a

A résolu


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

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

11 jours il y a

A résolu


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

11 jours il y a

A résolu


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

11 jours il y a

Charger plus