Community Profile

Contact

Top 1% contributor

Remove all characters that are below space in ASCII value.

Solve this!

4 months ago

Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

5 months ago

Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

Covering some basic topics I haven't seen elsewhere on Cody. Copy the input string to the clipboard

The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

Load more