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

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年以上 前

Indexing the last element: Print queue
* Delete the last element of row array printQueue.

4年以上 前

Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

4年以上 前

Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

4年以上 前

MATLAB Basic: rounding IV

4年以上 前

Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

4年以上 前

Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

4年以上 前

Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

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年以上 前

Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

4年以上 前

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

4年以上 前

Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle,...

4年以上 前

Sort complex numbers into complex conjugate pairs
Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

4年以上 前

Find x in provided equation!
x^2-2*x+1=0 This polynomial can be expressed by using each term's coefficients, such as [1 -2 1]. Using the polynomial ...

4年以上 前

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

4年以上 前

modulus of a number
find the modulus of a given number

4年以上 前

Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

4年以上 前

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.

4年以上 前

create a circulant matrix
create a circulant matrix

4年以上 前

Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

4年以上 前

Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

4年以上 前

MATLAB Basic: rounding II

4年以上 前

Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

4年以上 前

Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

4年以上 前

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

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 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

4年以上 前

Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

4年以上 前

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

4年以上 前