解決済み


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

10年弱 前

解決済み


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

10年弱 前

解決済み


Determine the square root
Determine the square root of the value the user has entered, n.

10年弱 前

解決済み


select the primes of a vector
Find the prime numbers in a vector

10年弱 前

解決済み


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

10年弱 前

解決済み


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

10年弱 前

解決済み


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

10年弱 前

解決済み


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

10年弱 前

解決済み


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

10年弱 前

解決済み


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

10年弱 前

解決済み


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

10年弱 前

解決済み


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

10年弱 前

解決済み


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

10年弱 前

解決済み


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

10年弱 前

解決済み


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

10年弱 前

解決済み


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

10年弱 前

解決済み


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

10年弱 前

解決済み


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

10年弱 前

解決済み


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

10年弱 前

解決済み


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

10年弱 前

解決済み


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

10年弱 前

解決済み


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

10年弱 前

解決済み


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

10年弱 前

解決済み


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

10年弱 前

解決済み


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

10年弱 前

解決済み


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

10年弱 前

解決済み


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

10年弱 前

解決済み


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

10年弱 前

解決済み


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

10年弱 前

解決済み


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

10年弱 前

さらに読み込む