Solved


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

meer dan 7 jaar ago

Solved


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

meer dan 7 jaar 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];

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar 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 ...

meer dan 7 jaar ago

Solved


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

meer dan 7 jaar ago

Solved


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Number of pennies
Complete the function ConvertToPennies() so that the function returns the total number of pennies given a number of dollars and ...

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

meer dan 7 jaar ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

meer dan 7 jaar ago

Solved


Negative Infinity
Round the given array a towards negative infinity.

meer dan 7 jaar ago

Solved


reverse string
input='rama' output='amar'

meer dan 7 jaar ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

meer dan 7 jaar ago

Solved


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

meer dan 7 jaar ago

Solved


Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...

meer dan 7 jaar ago

Solved


Generate pi using logarithm
Generate pi using logarithm

meer dan 7 jaar ago

Solved


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

meer dan 7 jaar ago

Solved


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

meer dan 7 jaar ago

Solved


For loops: Savings account
The for loop calculates the amount of money in a savings account after numberYears given an initial balace of savingsBalance and...

meer dan 7 jaar ago

Solved


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

meer dan 7 jaar ago

Load more