kmph to mps
convert kilometer per hour to meter per second
4ヶ月 前
解決済み
Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x
e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]
4ヶ月 前
解決済み
Building matrices
If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4;
5 6 7 8...
4ヶ月 前
解決済み
Sum of first n positive integers
Given n, find the sum of first n positive integers
Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55
Multiply a column by a row
* Given a column vector C and and a row vector R.
* Output a matrix M.
* Every column of M equals to C multiplied by correspon...
4ヶ月 前
解決済み
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
4ヶ月 前
解決済み
Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below the input, N.
Thank you <http:/...
4ヶ月 前
解決済み
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
4ヶ月 前
解決済み
Reverse a matrix
Its simple. You have to reverse a given matrix.
Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter.
For example:
x = [1 2 3 ...
4ヶ月 前
解決済み
MATLAB Basic: rounding IV
Do rounding towards plus infinity.
Example: -8.8, answer -8
+8.1 answer 9
+8.50 answer 9
4ヶ月 前
解決済み
MATLAB Basic: rounding III
Do rounding towards minus infinity.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 8
4ヶ月 前
解決済み
MATLAB Basic: rounding II
Do rounding nearest integer.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 9
Flip the vector from right to left
Flip the vector from right to left.
Examples
x=[1:5], then y=[5 4 3 2 1]
x=[1 4 6], then y=[6 4 1];
Request not to use d...