Gelöst


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

etwa ein Jahr vor

Gelöst


Delete the rows in the middle
We will delete the rows in the middle and keep the first and the last rows. For example if input is [1 2 1 7 1 8 ...

etwa ein Jahr vor

Gelöst


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE ...

etwa ein Jahr 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. For...

etwa ein Jahr vor

Gelöst


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

etwa ein Jahr vor

Gelöst


Compound interest - number e
A moneylender wants to receive his annual interest of 12% more frequently. If he receives his interest rate every six months,...

etwa ein Jahr vor

Gelöst


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

etwa ein Jahr vor

Gelöst


Cosine effect in solar power towers

etwa ein Jahr vor

Gelöst


RGB to CMYK
Convert an RGB code to the corresponding CMYK code for printing. The RGB input is a [1×3] double array between 0 and 1. ...

etwa ein Jahr vor

Gelöst


reverse string
input='rama' output='amar'

etwa ein Jahr vor

Gelöst


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

etwa ein Jahr vor

Gelöst


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

etwa ein Jahr vor

Gelöst


Test of Quiz
Answer the questions and write in vector. Only one answer is correct. The founder of fuzzy logic is 1a) D. Golberg 1b)...

etwa ein Jahr 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...

etwa ein Jahr vor

Gelöst


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

etwa ein Jahr vor

Gelöst


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

etwa ein Jahr vor

Gelöst


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

etwa ein Jahr 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 ein Jahr vor

Gelöst


Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

etwa ein Jahr vor

Gelöst


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 ...

etwa ein Jahr vor

Gelöst


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

etwa ein Jahr 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 ein Jahr vor

Gelöst


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

etwa ein Jahr vor

Gelöst


Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...

etwa ein Jahr vor

Gelöst


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

etwa ein Jahr vor

Gelöst


Calculating selling price
Cost of a Product is $x What should be the selling price if you want to gain 10%?

etwa ein Jahr vor

Gelöst


find the mean of all elements in a matrix
given a matrix, just find the mean of all elements in the matrix

etwa ein Jahr vor

Gelöst


first element of matrix
find the first elements of a column matrix

etwa ein Jahr vor

Mehr laden