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...
約9年 前
解決済み
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];
and ...
約9年 前
解決済み
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...
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...
約9年 前
解決済み
Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times.
Examples :
n=2, A=[1 2 3] -> [1 1 2 2 3 3]
n=0...
約9年 前
解決済み
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...
約9年 前
解決済み
Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...
約9年 前
解決済み
UICBioE240 problem 1.2
Convert a column vector into a row vector.
So if A = [1;
2;
3]
Then B = [ 1 2 3]
Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0.
a = 3;
b = [1,2,4];
Returns 0.
a = 3;
b = [1,...
約9年 前
解決済み
Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...