A résolu


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

plus de 7 ans il y a

A résolu


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

plus de 7 ans il y a

A résolu


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

plus de 7 ans il y a

A résolu


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

plus de 7 ans il y a

A résolu


inner product of two vectors
inner product of two vectors

plus de 7 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

plus de 7 ans il y a

A résolu


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

plus de 7 ans il y a

A résolu


Will there be a new leader?
Simply answer the title.

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

plus de 7 ans il y a

A résolu


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

plus de 7 ans il y a

A résolu


Rounding
Round 10.67 and make 'y' equal to that number.

plus de 7 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

plus de 7 ans il y a

A résolu


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

plus de 7 ans il y a

A résolu


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

plus de 7 ans il y a

A résolu


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

plus de 7 ans il y a

A résolu


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

plus de 7 ans il y a

A résolu


Complex number
For complex number c=a+bi, write code that will add a and b together.

plus de 7 ans il y a

A résolu


Negative matrix
Change the sign of all elements in given matrix.

plus de 7 ans il y a

A résolu


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

plus de 7 ans il y a

A résolu


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

plus de 7 ans il y a

A résolu


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

plus de 7 ans il y a

Charger plus