Solved


Ned's Queens
A tribute to Cody's five-year anniversary should also celebrate the people behind Cody, and in this particular case, our illustr...

8 years ago

Solved


Group-wise Euclidean distance
*Input*: * *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space; * *g* —— A gro...

8 years ago

Solved


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

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

9 years ago

Solved


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

9 years ago

Solved


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

9 years ago

Solved


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

9 years ago

Solved


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

9 years ago

Solved


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

9 years ago

Solved


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

9 years ago

Solved


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

9 years ago

Solved


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

9 years ago

Solved


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

9 years ago

Solved


Dosage by weight
A machine administer's medication dosage based on weight. Write an if-elseif-else statement that assigns the appropriate dosageA...

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

9 years ago

Solved


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

9 years ago

Solved


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

9 years ago

Solved


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

9 years ago

Solved


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

9 years ago

Solved


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

9 years ago

Solved


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

9 years ago

Solved


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

9 years ago

Solved


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

9 years ago

Solved


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

9 years ago

Solved


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

9 years ago

Solved


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

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

9 years ago

Solved


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

9 years ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

9 years ago

Solved


Generate pi using logarithm
Generate pi using logarithm

9 years ago

Load more