已解决


Spherical Volume
Calculate the volume of a sphere.

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


square number
Square a number

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

已解决


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

4 years 前

加载更多