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
9ヶ月 前
解決済み
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ヶ月 前
解決済み
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...
9ヶ月 前
解決済み
MATLAB Basic: rounding III
Do rounding towards minus infinity.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 8
9ヶ月 前
解決済み
MATLAB Basic: rounding II
Do rounding nearest integer.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 9
Draw "C" in a zero matrix
Given a x-by-x matrix filled with zeros (x> 4). Use 1 to draw a letter C into it! Like this:
x = 5, y =
1 1 1 1 1
1 0 0 0 1
...
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...
multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y.
Examples:
Input x = 2
Output y is ...
10ヶ月 前
解決済み
Beginner's Problem - Squaring
Try out this test problem first.
Given the variable x as your input, square it by two and put the result in y.
Examples:
...
10ヶ月 前
解決済み
How to permute given 3d matrix?
A(:,:,1)=[1 3]
A(:,:,2)=[2 2]
A(:,:,3)=[4 3]
Change rows to columns and columns to rows, similar to transpose.
Resul...
10ヶ月 前
解決済み
The great 82-year-old
Let's answer the question below;
'I am *x* years old and I have never written programs.
If I study from now, will I be able ...
10ヶ月 前
解決済み
Shift elements of vector left
Shift elements of vector to the left.
For ex. : Input_vec = [1 2 3 4 5]
Output_vec = [2 3 4 5 1]
10ヶ月 前
解決済み
Bit to Gigabyte
1 bit =
1.25 × 10^-10 gigabytes | x is bit | y is gigabyte