已解决


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

9 years 前

已解决


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

9 years 前

已解决


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

9 years 前

已解决


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

9 years 前

已解决


ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける(コンマはオプション)。 x = [1, 2, 3, 4] 問題:次のベクトルを出力する関数を作成せよ。...

9 years 前

已解决


prime test
find largest 2 digit prime number

9 years 前

已解决


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

9 years 前

已解决


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

9 years 前

已解决


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

9 years 前

已解决


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

9 years 前

已解决


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

9 years 前

已解决


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

9 years 前

已解决


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

9 years 前

已解决


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

9 years 前

已解决


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

9 years 前

已解决


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

9 years 前

已解决


Saving MATLAB session to a file
How to save MATLAB session to a file?

9 years 前

已解决


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

9 years 前

已解决


Variable Assignment
Complete the ? part by assigning myExamScore with 100.

9 years 前

已解决


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

9 years 前

已解决


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

9 years 前

已解决


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

9 years 前

已解决


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

9 years 前

已解决


Remove the Zero
Given an array n, remove all zeros

9 years 前

已解决


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

9 years 前

已解决


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

9 years 前

已解决


Luggage delivery
Assign deliveryCost with the cost to deliver a piece of baggage weighing baggageWeight. The service charges twenty dollars for ...

9 years 前

已解决


Sum function: Counting cookies
Row array troopCookieSales contains the number of boxes of cookies sold by each troop member. Assign totalSales with the sum of ...

9 years 前

已解决


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

9 years 前

已解决


Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

9 years 前

加载更多