Gelöst


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

fast 10 Jahre vor

Gelöst


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

fast 10 Jahre vor

Gelöst


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

fast 10 Jahre vor

Gelöst


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

fast 10 Jahre vor

Gelöst


list of prime numbers
n is given find the largest prime number <=n

fast 10 Jahre vor

Gelöst


this is a test problem
this is a anniversary test problem

fast 10 Jahre vor

Gelöst


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

fast 10 Jahre vor

Gelöst


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

fast 10 Jahre vor

Gelöst


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

fast 10 Jahre vor

Gelöst


Longest Divisor Run
Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

fast 10 Jahre vor

Gelöst


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

fast 10 Jahre vor

Gelöst


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


Try and Catch Simple Example
Try and Catch Simple Example <http://in.mathworks.com/help/matlab/ref/try.html Example> Vector x=[1 4 6 8 10]; Create...

fast 10 Jahre vor

Gelöst


imaginary results
Return the value of the imaginary number i to the power of input argument n.

fast 10 Jahre vor

Gelöst


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

fast 10 Jahre vor

Gelöst


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

fast 10 Jahre vor

Gelöst


Continued fractions
Find a <http://en.wikipedia.org/wiki/Continued_fraction continued fraction> approximation of x.

fast 10 Jahre vor

Gelöst


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

fast 10 Jahre vor

Gelöst


Decide whether determinant is zero.
Given a 3 x 3 matrix, find the determinant. Let y = true if the determinant is zero, and let y = false if the determinant is no...

fast 10 Jahre vor

Gelöst


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

fast 10 Jahre vor

Gelöst


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

fast 10 Jahre vor

Gelöst


Product of Array
Given an array of numbers. Get the product of the array.

fast 10 Jahre vor

Gelöst


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

fast 10 Jahre vor

Gelöst


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

fast 10 Jahre vor

Gelöst


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

fast 10 Jahre vor

Gelöst


Back to basics 3 - Temp Directory
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...

fast 10 Jahre vor

Gelöst


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

fast 10 Jahre vor

Gelöst


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

fast 10 Jahre vor

Gelöst


Saving MATLAB session to a file
How to save MATLAB session to a file?

fast 10 Jahre vor

Mehr laden