Solved


y equals x divided by 2
function y = x/2

10 years ago

Solved


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

10 years ago

Solved


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

10 years ago

Solved


Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in attendanceV...

10 years ago

Solved


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

10 years ago

Solved


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

10 years ago

Solved


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

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

10 years ago

Solved


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

10 years ago

Solved


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

10 years ago

Solved


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

10 years ago

Solved


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

10 years ago

Solved


square number
Square a number

10 years ago

Solved


Times 3 problem
When you enter the number, it should return the number multiplied by 3

10 years ago

Solved


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

10 years ago

Solved


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

10 years ago

Solved


Decode a simplified barcode
Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

10 years ago

Solved


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

10 years ago

Solved


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

10 years ago

Solved


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

10 years ago

Solved


Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...

10 years ago

Solved


Construct an array
* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

10 years ago

Solved


Declaring a character
* Assign middleInitial with the character T.

10 years ago

Solved


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

10 years ago

Solved


Multiple element-wise operations: Percent change
Row arrays sales2013 and sales2014 reflect the quarterly sales (in millions) of a popular potato chip company. Write a statement...

10 years ago

Solved


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

10 years ago

Solved


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

10 years ago

Solved


Multi-line comments
* Fix the syntax errors.

10 years ago

Solved


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

10 years ago

Solved


Function call in expression: Reduced pricing.
Write a single statement that assigns cartTotal with the discounted cost of items 1 and 2. Function DiscountedPrice will return ...

10 years ago

Load more