Gelöst


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

mehr als 9 Jahre vor

Gelöst


Writing a recursive math function
Complete the recursive function RaiseToPower(). Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...

mehr als 9 Jahre vor

Gelöst


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

mehr als 9 Jahre vor

Gelöst


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

mehr als 9 Jahre vor

Gelöst


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

mehr als 9 Jahre vor

Gelöst


Populating an array with a for loop
Write a for loop to populate multiplicationTable with the multiples of baseValue from 0 to 5. Ex: If baseValue is 2, then mu...

mehr als 9 Jahre vor

Gelöst


Convert letters to Greek letter
Write a switch statement that checks origLetter. If origLetter is 'a' or 'A', assign greekLetter with 'Alpha'. If origLetter is ...

mehr als 9 Jahre vor

Gelöst


frame of the matrix
Given the matrix M, return M without the external frame.

mehr als 9 Jahre vor

Gelöst


Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

mehr als 9 Jahre vor

Gelöst


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

mehr als 9 Jahre vor

Gelöst


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

mehr als 9 Jahre vor

Gelöst


Modify an array's elements
Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. ...

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

mehr als 9 Jahre vor

Gelöst


Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

mehr als 9 Jahre vor

Gelöst


UICBioE240 2.1
This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows th...

mehr als 9 Jahre vor

Gelöst


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

mehr als 9 Jahre vor

Gelöst


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

mehr als 9 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...

mehr als 9 Jahre vor

Gelöst


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

mehr als 9 Jahre vor

Gelöst


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

mehr als 9 Jahre vor

Gelöst


Saving MATLAB session to a file
How to save MATLAB session to a file?

mehr als 9 Jahre vor

Gelöst


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

mehr als 9 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 ...

mehr als 9 Jahre vor

Gelöst


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

mehr als 9 Jahre vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

mehr als 9 Jahre vor

Gelöst


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

mehr als 9 Jahre vor

Gelöst


Array of Ones
Create a 100 X 100 array of ones.

mehr als 9 Jahre vor

Mehr laden