Risolto


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

quasi 11 anni fa

Risolto


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

quasi 11 anni fa

Risolto


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

quasi 11 anni fa

Risolto


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

quasi 11 anni fa

Risolto


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

quasi 11 anni fa

Risolto


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

quasi 11 anni fa

Risolto


03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

quasi 11 anni fa

Risolto


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

quasi 11 anni fa

Risolto


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

quasi 11 anni fa

Risolto


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

quasi 11 anni fa

Risolto


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

quasi 11 anni fa

Risolto


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

quasi 11 anni fa

Risolto


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

quasi 11 anni fa

Risolto


convert matrix to single column
given any matrix, convert it to single column

quasi 11 anni fa

Risolto


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

quasi 11 anni fa

Risolto


Adding an element: Ticker tape
* Add stockPrice to the beginning of row array tickerTape

quasi 11 anni fa

Risolto


Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

quasi 11 anni fa

Risolto


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

quasi 11 anni fa

Risolto


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

quasi 11 anni fa

Risolto


Variable sized row arrays
* Reverse the contents of row array mileMarkers

quasi 11 anni fa

Risolto


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the colon operator. * Transpose countValues to result in...

quasi 11 anni fa

Risolto


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

quasi 11 anni fa

Risolto


03 - Matrix Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

quasi 11 anni fa

Risolto


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

quasi 11 anni fa

Carica altro