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...
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...
Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...
6ヶ月 前
解決済み
Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000
e.g. x = 12,358,466,243 --> y = 12,358,470,000
6ヶ月 前
解決済み
Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places:
e.g. x = 2.3456 --> y = 2.346
6ヶ月 前
解決済み
Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...
6ヶ月 前
解決済み
MATLAB Basic: rounding IV
Do rounding towards plus infinity.
Example: -8.8, answer -8
+8.1 answer 9
+8.50 answer 9
6ヶ月 前
解決済み
MATLAB Basic: rounding III
Do rounding towards minus infinity.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 8
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
6ヶ月 前
解決済み
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.]
Non-scored bonus...
6ヶ月 前
解決済み
Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum.
Given a matrix ...
6ヶ月 前
解決済み
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given number of...
6ヶ月 前
解決済み
Sum of series IX
What is the sum of the following sequence:
Σ 1/k! for k=1...n
for different n?