Sum of elements in a vector (★)
(copy of Prob. 3)
Find the sum of all the numbers of the input vector x.
Input x = [1 2 3 5]
Output y is 11
<>
...
3年以上 前
解決済み
Element-wise vector product (★)
Given two vectors x and y, compute their element-wise product z.
Thus, if x = [1 3 5] and y = [0.5 -1 2], then
z = [1*0.5...
String Delimination and Outputting
In this problem, take an incoming string and deliminate the string based on spaces. Output the first string in between the space...
3年以上 前
解決済み
Automatic String Editing
In this function, you will take an incoming string, and output the same string with each character one letter later in the alpha...
More Simple String Concatenation
Take the first string input, reverse the order of the string from the end to beginning (i.e. apple becomes elppa), add a space a...
3年以上 前
解決済み
Simple String Concatenation
This is a simple problem involving taking two incoming strings, and outputting the concatenated string with a space separating t...
3年以上 前
解決済み
Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)
Replace all odd numbers with NaN
Replace all odd numbers in the vector or matrix with NaN. For example, if
x = [1 3 4 5 8 11];
then return
y = [NaN Na...
3年以上 前
解決済み
Sum the rows
Sum the rows of the given matrix.
Example
x = [ 1 2
3 4 ]
y = [ 3
7 ]