Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0
Example
x = [ 3 3 4 6 1]
...
Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array
6年弱 前
解決済み
Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...
6年弱 前
解決済み
Initialize a Natural Number matrix.
Given length of matrix initialize a matrix consisting of natural numbers from 1 to n:
n = 10;
x = [ 1 2 3 4 5 6 7 8 9 10];
...
6年弱 前
回答済み what is wrong with this code?
the variable temp1 is not single value. it is a vector so need to check the equation
6年弱 前 | 0
解決済み
Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.
6年弱 前
解決済み
Duplicate a character
Duplicate a character 'n' times.
Example 1: str='a' n=5
output='aaaaa'
Example 2: str='*' n=3
output='***'
Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example
start with x = 1 and y = 3
end with y = 1 and x = 3
Do NOT simply r...
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年弱 前
解決済み
Help the Patriots get to the Super Bowl
Given a football by the Patriots, return it to them with 2 psi less air in it.
(The original psi is passed as a number to the...
6年弱 前
解決済み
Box!
Given a box, find the volume of the cube. With each side = a.
6年弱 前
解決済み
Determine the mean of matrix
Determine the mean of matrix without using mean function
Hint: use simple algorithm
Solve a System of Linear Equations
*Example*:
If a system of linear equations in _x₁_ and _x₂_ is:
2 _x₁_ + _x₂_ = 2
_x₁...