Gelöst


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.

etwa 12 Jahre vor

Gelöst


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.

etwa 12 Jahre vor

Gelöst


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

etwa 12 Jahre vor

Gelöst


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

etwa 12 Jahre vor

Gelöst


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

etwa 12 Jahre vor

Gelöst


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

etwa 12 Jahre vor

Gelöst


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

etwa 12 Jahre vor

Gelöst


Min of a Matrix
Return the minimum value in the given matrix.

etwa 12 Jahre vor

Gelöst


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

etwa 12 Jahre vor

Gelöst


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

etwa 12 Jahre vor

Gelöst


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

etwa 12 Jahre vor

Gelöst


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

etwa 12 Jahre vor

Gelöst


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

etwa 12 Jahre vor

Gelöst


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

etwa 12 Jahre vor

Gelöst


Will there be a new leader?
Simply answer the title.

etwa 12 Jahre vor

Gelöst


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

etwa 12 Jahre vor

Gelöst


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

etwa 12 Jahre vor

Gelöst


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

etwa 12 Jahre vor

Gelöst


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

etwa 12 Jahre vor

Gelöst


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

etwa 12 Jahre vor

Gelöst


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

etwa 12 Jahre vor

Gelöst


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

etwa 12 Jahre vor

Gelöst


Equal to their cube
Tell me three real numbers that are equal to their cubes?

etwa 12 Jahre vor

Gelöst


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

etwa 12 Jahre vor

Gelöst


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

etwa 12 Jahre vor

Gelöst


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): As an addit...

etwa 12 Jahre vor

Gelöst


kmph to mps
convert kilometer per hour to meter per second

etwa 12 Jahre vor

Gelöst


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

etwa 12 Jahre vor

Mehr laden