Gelöst


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Population growth
Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The fi...

fast 11 Jahre vor

Gelöst


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

fast 11 Jahre vor

Gelöst


Coordinate geometry
Assign pointsDistance with the distance between point (x1, y1) and point (x2, y2). The distance is calculated by: Distance =...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Write an expression
Assigns finalResult with firstSample plus secondSample, squared, then divided by 3. Ex: If firstSample is 18 and secondSample is...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Compute total cost
A soda costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the numb...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Determine the length of a string of characters
Determine the length of a string of characters

fast 11 Jahre vor

Gelöst


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

fast 11 Jahre vor

Gelöst


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

fast 11 Jahre vor

Gelöst


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

fast 11 Jahre vor

Gelöst


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

fast 11 Jahre vor

Gelöst


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

fast 11 Jahre vor

Gelöst


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

fast 11 Jahre vor

Gelöst


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

fast 11 Jahre vor

Gelöst


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

fast 11 Jahre vor

Gelöst


Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

fast 11 Jahre vor

Gelöst


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

fast 11 Jahre vor

Gelöst


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

fast 11 Jahre vor

Gelöst


Logic variables
* Assign isAvailable with true.

fast 11 Jahre vor

Mehr laden