已解决


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

8 years 前

已解决


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

8 years 前

已解决


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

8 years 前

已解决


Acid and water
⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...

8 years 前

已解决


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

8 years 前

已解决


Sort complex numbers into complex conjugate pairs
Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

8 years 前

已解决


Combine the first and last names
MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays o...

8 years 前

已解决


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

8 years 前

已解决


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

8 years 前

已解决


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

8 years 前

已解决


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

8 years 前

已解决


Is this a valid Tic Tac Toe State?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

8 years 前

已解决


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

8 years 前

已解决


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

8 years 前

已解决


UICBioE240 problem 1.1
Remove the middle row from a matrix, assuming # of rows is odd. So if A = [ 1 2 3; 4 5 6; 7 8 9] the...

8 years 前

已解决


Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

8 years 前

已解决


Largest Prime Number
Given a matrix X, find the largest prime number in X.

8 years 前

已解决


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

8 years 前

已解决


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

8 years 前

已解决


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

8 years 前

已解决


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

8 years 前

已解决


Find the sum of n squares
What is the sum of the squares of the first n integers?

8 years 前

已解决


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

8 years 前

已解决


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

8 years 前

已解决


Test
Answer the question and the correct answer write in vector. Only one answer is correct. 1a Yes 1b No 1c No 1d No ...

8 years 前

已解决


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

8 years 前

已解决


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

8 years 前

已解决


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

8 years 前

已解决


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

8 years 前

已解决


Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

8 years 前

加载更多