解決済み


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

4ヶ月 前

解決済み


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

4ヶ月 前

解決済み


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

4ヶ月 前

解決済み


Voltage in a lamp
A lamp is measured to have a resistance of R ohms when it operates at a power of P Watts. What is the voltage (in volts) being a...

4ヶ月 前

解決済み


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

4ヶ月 前

解決済み


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

4ヶ月 前

解決済み


Back to basics 5 - Clipboard
Covering some basic topics I haven't seen elsewhere on Cody. Copy the input string to the clipboard

4ヶ月 前

解決済み


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

4ヶ月 前

解決済み


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

4ヶ月 前

解決済み


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

4ヶ月 前

解決済み


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

4ヶ月 前

解決済み


Positive Infinity
Round the array a towards positive infinity

4ヶ月 前

解決済み


Area of rhombus
Calculate the rhombus area

4ヶ月 前

解決済み


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

4ヶ月 前

解決済み


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

4ヶ月 前

解決済み


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

4ヶ月 前

解決済み


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

4ヶ月 前

解決済み


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

4ヶ月 前

解決済み


Will there be a new leader?
Simply answer the title.

4ヶ月 前

解決済み


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

4ヶ月 前

解決済み


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

4ヶ月 前

解決済み


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

4ヶ月 前

解決済み


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

4ヶ月 前

解決済み


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

4ヶ月 前

解決済み


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

4ヶ月 前

解決済み


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

4ヶ月 前

解決済み


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

4ヶ月 前

解決済み


factorial of a number x
Factorial of a number x

4ヶ月 前

解決済み


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

4ヶ月 前

解決済み


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

4ヶ月 前

さらに読み込む