Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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.

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


Generate pi using logarithm
Generate pi using logarithm

fast 10 Jahre vor

Mehr laden