Solved

Say type of roots in quadratic equation

Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

4 months ago

Solved

Summation of array

Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

4 months ago

Solved

Calculate the square of a number (Super Easy)

The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

4 months ago

Solved

Crop an Image

A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

4 months ago

Solved

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

4 months ago

Solved

Wind Chill Computation

On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

4 months ago

Solved

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]

4 months ago

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

4 months ago

Solved

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

4 months ago

Solved

Matlab Basics - y as a function of x

Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

4 months ago

Solved

Pi Estimate 1

Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

4 months ago

Solved

Quadratic equation

given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

4 months ago

Solved

First N Perfect Squares

*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

4 months ago

Solved

Perfect square.

Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

4 months ago

Solved

Area of a Square

Given the length x of the side of a regular square, find the area of the square, A.

4 months ago

Solved

Create sequnce 1 4 9 16 25.........

Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

4 months ago

Solved

05 - Vector Equations 2

Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

4 months ago

Solved

Kinetic Energy

Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

4 months ago

Solved

Factorial Numbers

Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

4 months ago

Solved

Sum the squares of numbers from 1 to n

For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

4 months ago

Solved

Divide by 4

Given the variable x as your input, divide it by 4 and put the result in y.

4 months ago

Solved

Square the input

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

4 months ago