Gelöst


Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.

7 Tage vor

Gelöst


High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...

7 Tage vor

Gelöst


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

7 Tage vor

Gelöst


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

7 Tage vor

Gelöst


Predict Cricket Stridulation Rate from Air Temperature
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...

7 Tage vor

Gelöst


Find Air Temperature from Cricket Stridulation Rate
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...

7 Tage vor

Gelöst


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

7 Tage vor

Gelöst


Converts numbers into characters
Converts numbers into characters

7 Tage vor

Gelöst


Find the max element of the array
Find the max element of the array

7 Tage vor

Gelöst


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

7 Tage vor

Gelöst


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

7 Tage vor

Gelöst


to the 2 all elements
to the 2 all elements

7 Tage vor

Gelöst


the average value of the elements
Calculate the average value of the elements in the array

7 Tage vor

Gelöst


Double all elements in the array
Duplicate all elements in the array

7 Tage vor

Gelöst


calculate the length of matrix
input 1 array, calculate the length

7 Tage vor

Gelöst


Draw a '0' in a one matrix!

7 Tage vor

Gelöst


Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

7 Tage vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

7 Tage vor

Gelöst


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

8 Tage vor

Gelöst


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. Slightly harder than it seems like it should be. Exampl...

8 Tage vor

Gelöst


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

8 Tage vor

Gelöst


String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

8 Tage vor

Gelöst


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

8 Tage vor

Gelöst


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

8 Tage vor

Gelöst


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

8 Tage vor

Gelöst


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

8 Tage vor

Gelöst


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

8 Tage vor

Gelöst


radius of a spherical planet
You just measured its surface area, that is the input.

8 Tage vor

Gelöst


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as y = A.ⅇ^(-λt)*cos(2πft) where A, λ, and f are scalars and t is a vector. ...

9 Tage vor

Gelöst


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

9 Tage vor

Mehr laden