A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


square number
Square a number

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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]

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Declaring a character
* Assign middleInitial with the character T.

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Multi-line comments
* Fix the syntax errors.

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

Charger plus