Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...
Angle between two vectors
You have two vectors , determine the angle between these two vectors
For example:
u = [0 0 1];
v = [1 0 0];
The a...
約2年 前
解決済み
Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice.
Ex...
約2年 前
解決済み
Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.
約2年 前
解決済み
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next.
Example input:
x = [10 2];
約2年 前
解決済み
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...
約2年 前
解決済み
Given area find sides
In a right angle triangle given area 'A'
one arm=x, another arm=2x
then find the value of x.
For example, area A=400 then ...
Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...
約2年 前
解決済み
Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes.
---
You may already know how to <http://www.mathworks....
約2年 前
解決済み
Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes.
---
Logical indexing works like this.
thresh = 4...
約2年 前
解決済み
MATLAB Basic: rounding II
Do rounding nearest integer.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 9