Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B.
So if
A = [1 2 3;
4 5 6];
...
約4年 前
解決済み
Reverse the vector
Reverse the vector elements.
Example:
Input x = [1,2,3,4,5,6,7,8,9]
Output y = [9,8,7,6,5,4,3,2,1]
約4年 前
解決済み
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
約4年 前
解決済み
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displa...
約4年 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
約4年 前
解決済み
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false.
Example...
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
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....
Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following:
* ...
約4年 前
解決済み
Create a vector
Create a vector from 0 to n by intervals of 2.
約4年 前
解決済み
Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...
約4年 前
解決済み
Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....
約4年 前
解決済み
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...