Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody.
Switch the byte order of the input (i.e. if little-endian -> big...
2ヶ月 前
解決済み
Stress-Strain Properties - 5
Similar to the previous problem, materials may be characterized by their stiffness-to-weight ratio, which is the elastic modulus...
2ヶ月 前
解決済み
Create an anti-identity matrix
Create an anti-identity matrix of given dimension.
Examples
n = 2
A = [0 1; 1 0]
n = 3
A = [0 0 1; 0 1 0; 1 0 0...
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...
2ヶ月 前
解決済み
UICBioE240 problem 1.18
exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.
2ヶ月 前
解決済み
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
...
2ヶ月 前
解決済み
Cos Function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.
Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings
Example:
A is a double, for example 2.34
B is a...
Stress-Strain Properties - 4
A common measure of the ability of a material to carry load per unit mass is termed strength-to-weight ratio and is calculated b...
2ヶ月 前
解決済み
construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x.
E...
2ヶ月 前
解決済み
Is it column vector?
Is it column vector?
Check vector for column vector without using iscolumn function.
Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)
2ヶ月 前
解決済み
What day is it?
Tell me what day is it. Return the full name of the day of the week as a string.
e.g. It's June 12th 2014, so your function s...
2ヶ月 前
解決済み
angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input.
Please pay attention, that 1 ...
2ヶ月 前
解決済み
Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'.
Examples
x = [ 1...
2ヶ月 前
解決済み
Concatenate strings
concatenate a variable number of input strings to produce one outputstring
Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...
2ヶ月 前
解決済み
Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero.
Example:...
2ヶ月 前
解決済み
Tax Calculator
Calculate the tax for a given income.
10% tax is paid for any income up to $2,000.
20% tax is paid for additional income u...