Feeds
已回答
Basic question regarding adding A to all numbers greater than B
You could have an if function and go through the array element by element. If the number is greater than 5 you could add 2 to ...
Basic question regarding adding A to all numbers greater than B
You could have an if function and go through the array element by element. If the number is greater than 5 you could add 2 to ...
7 years 前 | 0
提问
Convert DICOM video (4D) to 3D matrix
I have a DICOM ultrasound video, when I save it as a .mat file I find that it is a unit8 file with a 4D matrix. I thought the ou...
7 years 前 | 1 个回答 | 0
1
个回答提问
Prime number list checker
Ok so just for fun and practice I have been having a go at creating a prime number checker. I have been successful in making it ...
9 years 前 | 1 个回答 | 0
1
个回答已解决
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....
9 years 前
已解决
Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...
9 years 前
已解决
Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.
9 years 前
已解决
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
9 years 前
已解决
Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...
9 years 前
已解决
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
9 years 前
已解决
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
9 years 前
已解决
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...
9 years 前
已解决
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
9 years 前
已解决
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
9 years 前
已解决
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
9 years 前
已解决
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
9 years 前
已解决
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
9 years 前
提问
Trying to combine For and If loop
I watched a video on the 3n + 1 conjecture and just wanted to try and see if I could create a simple program to replicate a few ...
9 years 前 | 1 个回答 | 0