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];
...
約2ヶ月 前
解決済み
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...
約2ヶ月 前
解決済み
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...
約2ヶ月 前
解決済み
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displayed ...
約2ヶ月 前
解決済み
Reverse the characters of a string
Given a string, return the string with characters in reverse order. Example: rev_string('hello') returns 'olleh'
約2ヶ月 前
解決済み
Sum the main diagonal of a matrix
Given a square matrix, return the sum of its main diagonal elements. Example: diag_sum([1 2 3; 4 5 6; 7 8 9]) returns 15
約2ヶ月 前
解決済み
Determine if a number is prime
Given a positive integer n, return 1 if it is prime, 0 otherwise. Example: is_prime(7) returns 1, is_prime(4) returns 0
約2ヶ月 前
解決済み
Find the Oldest Person in a Room
Given two input vectors:
* |name| - user last names
* |age| - corresponding age of the person
Return the name of the ol...
約2ヶ月 前
解決済み
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...
約2ヶ月 前
解決済み
Hemisphere Volume on Top of a Cylinder
This MATLAB function has to calculate the volume of a hemisphere placed on top of a cylinder, given valid inputs. It takes the r...
約2ヶ月 前
解決済み
04 - Scalar Equations 1
Define the variable a:
<<http://samle.dk/STTBDP/Assignment1_4-a.png>>
Use this to calculate x:
<<http://samle.dk/STTBD...