解決済み


Spherical Volume
Calculate the volume of a sphere.

6年弱 前

解決済み


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

6年弱 前

解決済み


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

6年弱 前

解決済み


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

6年弱 前

解決済み


square number
Square a number

6年弱 前

解決済み


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

6年弱 前

解決済み


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

6年弱 前

解決済み


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

6年弱 前

解決済み


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

6年弱 前

解決済み


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

6年弱 前

解決済み


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

6年弱 前

解決済み


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

6年弱 前

解決済み


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

6年弱 前

解決済み


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

6年弱 前

解決済み


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

6年弱 前

解決済み


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

6年弱 前

解決済み


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

6年弱 前

解決済み


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

6年弱 前

解決済み


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

6年弱 前

解決済み


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

6年弱 前

解決済み


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

6年弱 前

解決済み


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

6年弱 前

解決済み


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

6年弱 前

解決済み


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

6年弱 前

解決済み


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

6年弱 前

解決済み


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

6年弱 前

解決済み


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

6年弱 前

解決済み


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

6年弱 前

解決済み


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

6年弱 前

解決済み


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

6年弱 前

さらに読み込む