Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
5 days 前
已解决
Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for:
A = [ 1 5 8 ]
then
B = [ 1 1 5 ...
5 days 前
已解决
Create a vector
Create a vector from 0 to n by intervals of 2.
5 days 前
已解决
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...
Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B?
>>A=[2,4;3,5];
>>B=[-2.5,2;1.5,-1];
>>isInverse...
5 days 前
已解决
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
5 days 前
已解决
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.]
Non-scored bonus...
5 days 前
已解决
Maximum value in a matrix
Find the maximum value in the given matrix.
For example, if
A = [1 2 3; 4 7 8; 0 9 1];
then the answer is 9.
Find Logic 14
Guess the Logic!
logic(1) = 100
logic(2) = 96
logic(3) = 105
logic(4) = 89
logic(5) = 114
Make a function logic(x) which w...
6 days 前
已解决
Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes.
---
If you want to get a random permutation of integer...