解決済み


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

10年弱 前

解決済み


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

10年弱 前

解決済み


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

10年弱 前

解決済み


UICBioE240 problem 1.2
Convert a column vector into a row vector. So if A = [1; 2; 3] Then B = [ 1 2 3]

10年弱 前

解決済み


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

10年弱 前

解決済み


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

10年弱 前

解決済み


Square a Number
Given an input x, return y, which is equal to the square of x.

10年弱 前

解決済み


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

10年弱 前

解決済み


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

10年弱 前

解決済み


Remove the Zero
Given an array n, remove all zeros

10年弱 前

解決済み


Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

10年弱 前

解決済み


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

10年弱 前

解決済み


Size of this cup?
The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

10年弱 前

解決済み


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

10年弱 前

解決済み


Area of a circle
Find the value for area of the circle if diameter is given

10年弱 前

解決済み


square number
Square a number

10年弱 前

解決済み


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

10年弱 前

解決済み


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

10年弱 前

解決済み


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

10年弱 前

解決済み


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

10年弱 前

解決済み


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

10年弱 前

解決済み


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

10年弱 前

解決済み


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

10年弱 前

解決済み


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

10年弱 前

解決済み


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

10年弱 前

解決済み


Modify an array's elements
Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. ...

10年弱 前

解決済み


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]

10年弱 前

解決済み


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

10年弱 前

解決済み


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

10年弱 前

解決済み


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

10年弱 前

さらに読み込む