Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

2 days ago

Solved


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

5 days ago

Solved


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

5 days ago

Solved


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.

5 days ago

Solved


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

5 days ago

Solved


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

5 days ago

Solved


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

5 days ago

Solved


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.

5 days ago

Solved


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

5 days ago

Solved


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

5 days ago

Solved


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

5 days ago

Solved


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

6 days ago

Solved


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

7 days ago

Solved


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

7 days ago

Solved


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

7 days ago

Solved


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

7 days ago

Solved


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.

7 days ago

Solved


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

7 days ago

Load more