Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists.
x = [2 6 4 9 -10 3 1 5 -10];
So
...
約1ヶ月 前
解決済み
Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below.
Example
x = [2 3 6 9]
then y should be
[...
約2ヶ月 前
解決済み
Oh Zero Zero Zero!!!
Hello all,
So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...
約2ヶ月 前
解決済み
Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...
約2ヶ月 前
解決済み
Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...
Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes.
---
You may already know how to find the logical indices o...
約2ヶ月 前
解決済み
Sum of series VII
What is the sum of the following sequence:
Σ(km^k)/(k+m)! for k=1...n
for different n and m?
約2ヶ月 前
解決済み
Sum of series II
What is the sum of the following sequence:
Σ(2k-1)^2 for k=1...n
for different n?
約2ヶ月 前
解決済み
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given number of...
約2ヶ月 前
解決済み
Sum of series I
What is the sum of the following sequence:
Σ(2k-1) for k=1...n
for different n?
Find max
Find the maximum value of a given vector or matrix.
約2ヶ月 前
解決済み
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...
約2ヶ月 前
解決済み
Create a vector
Create a vector from 0 to n by intervals of 2.
約2ヶ月 前
解決済み
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
約2ヶ月 前
解決済み
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 ...
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...
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...