Basic commands - rounding
make a function which will round to integer, which is nearer to zero.
Example
x=[-2.5 2];
y=[-2 2];
約9年 前
解決済み
Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds.
Given 1000mg of Einsteinium-253 at t=0 days, how
much is lef...
約9年 前
解決済み
Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x.
Example:
For inputs p and x
...
Put Two 1D matrices into one 1D matrix
Example:
If
input a = [1 2 3 4 5];
input b = [10 9 8 7 6];
then output will be,
y_correct = [1 10 2 9 3 8 4 7 5...
約9年 前
解決済み
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...
約9年 前
解決済み
Is It a Palindrome?
Given a string or array, determine if it is a palindrome.
Remove the middle element from a vector
Remove the middle element of a vector?
*Example:*
[1,2,3] should return 2
[1,2,3,4] should return 2
[] should return...
約9年 前
解決済み
Change string to number
Change given string to number. (hint: there is already function)
Changing from ['1234'] to [1234] is one of example
約9年 前
解決済み
Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1.
Change matrix to vector.
x =
4 3
5 1
...
MATLAB Basic: rounding III
Do rounding towards minus infinity.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 8
約9年 前
解決済み
Was ist denn los?
Nur für deutschsprechende Leute!
Wie geht's?
...also gut, bis bald!
約9年 前
解決済み
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...
約9年 前
解決済み
MATLAB Basic: rounding IV
Do rounding towards plus infinity.
Example: -8.8, answer -8
+8.1 answer 9
+8.50 answer 9
約9年 前
解決済み
Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15.
Given a temperature in Kelvin, return the equivalent temperature in Celsius.
Matlab Basics II - 3 Dimensional Arrays
Assume x is a 3D array with n pages, representing students in a class, for each student (page in the array, the 3rd dimension), ...