Gelöst


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

etwa 7 Jahre vor

Gelöst


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

etwa 7 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 7 Jahre vor

Gelöst


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

etwa 7 Jahre vor

Gelöst


square root
Find the square root (y) of an input (x).

etwa 7 Jahre 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: * ...

etwa 7 Jahre vor

Gelöst


ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける(コンマはオプション)。 x = [1, 2, 3, 4] 問題:次のベクトルを出力する関数を作成せよ。...

etwa 7 Jahre vor

Gelöst


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

etwa 7 Jahre vor

Gelöst


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

etwa 7 Jahre vor

Gelöst


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

etwa 7 Jahre vor

Gelöst


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

etwa 7 Jahre vor

Gelöst


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

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

etwa 7 Jahre vor

Gelöst


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

etwa 7 Jahre vor

Gelöst


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

etwa 7 Jahre vor

Gelöst


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

etwa 7 Jahre vor

Gelöst


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

etwa 7 Jahre vor

Gelöst


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

etwa 7 Jahre vor

Gelöst


Least common multiple of many numbers
1:6 -> 60

etwa 7 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 7 Jahre vor

Gelöst


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

etwa 7 Jahre vor

Gelöst


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

etwa 7 Jahre vor

Gelöst


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

etwa 7 Jahre vor

Gelöst


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

etwa 7 Jahre vor

Gelöst


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

etwa 7 Jahre vor

Gelöst


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

etwa 7 Jahre vor

Gelöst


y equals x divided by 2
function y = x/2

etwa 7 Jahre vor

Gelöst


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

etwa 7 Jahre vor

Gelöst


Negative Infinity
Round the given array a towards negative infinity.

etwa 7 Jahre vor

Gelöst


Remove the first, third and fifth rows of a matrix
Given a matrix x with at least five rows, return a matrix y that includes all rows of x except for th 1st, the 3rd and 5th. E...

etwa 7 Jahre vor

Mehr laden