Solved

Matlab Basics II - Log and natural log

Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

7 Monate ago

Solved

Sum of diagonals elements of a matrix

Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

7 Monate ago

Solved

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

7 Monate ago

Solved

Append two matrix as shown below example

Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

7 Monate ago

Solved

Find the sum of n squares

What is the sum of the squares of the first n integers?

7 Monate ago

Solved

Tricky timing

Write a function that takes between 0.5 seconds and 0.6 seconds to run.

7 Monate ago

Solved

Find Out sum of principal diagonal element of given matrix

Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

7 Monate ago

Solved

Matlab Basics - Set unwanted parts of a vector to zero

Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

7 Monate ago

Solved

Back to basics 14 - Keywords

Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

7 Monate ago

Solved

Vector Magnitude Calculator

'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

7 Monate ago

Solved

Replace May with April

For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

7 Monate ago

Solved

06 - Matrix Equations 3

Define the matrices _aMat_, _bMat_, and _cMat_: <<http://samle.dk/STTBDP/Assignment1_3a.png>> ( _aMat_ = 9x9 matrix full o...

7 Monate ago

Solved

03 - Matrix Variables 5

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

7 Monate ago

Solved

Which quadrant?

Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

7 Monate ago

Solved

Average of square wave

given positive and negative peak , calculate dc level, 50% duty cycle

7 Monate ago

Solved

Evaluate Polynomial

Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

7 Monate ago

Solved

Matlab Basics II - Create a vector with a repeated entry

Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

7 Monate ago

Solved

metre to feet converter

The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

7 Monate ago

Solved

2 b | ~ 2 b

Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

7 Monate ago

Solved

Solving Quadratic Equations (Version 1)

Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

7 Monate ago

Solved

Circumscribed circles

Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

7 Monate ago

Solved

Cannon Ball

Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

7 Monate ago

Solved

Determine if input is divisible by three.

Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

7 Monate ago

Solved

Convert Fahrenheit to Celsius

Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

7 Monate ago

Solved

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

7 Monate ago

Solved

Basic arrays operations.

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

7 Monate ago