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...
Ternary Conditional Operator
Returns one of two expressions depending on a condition.
(test) : (expression1) : (expression2)
*test:*
Any Boolean ex...
4年以上 前
解決済み
Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan).
With problem n°250 by Doug, you can find some global methods to ...
4年以上 前
質問
All available default settings for groot?
Hello,
Today I've found that I can change the default order of line colors and line styles of multi-line plot using
set(gr...
4年以上 前 | 2 件の回答 | 0
2
回答
質問
Behavior of callback function?
Hello,
I wanted to break out of a while-loop when a pushbutton is clicked on a figure, so I wrote the code below.
function c...
5年弱 前 | 1 件の回答 | 0
1
回答
解決済み
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:...
getCmapString
returns the colormap of selected handle as a string.
約5年 前 | ダウンロード 1 件 |
解決済み
Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...
5年以上 前
解決済み
Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
5年以上 前
解決済み
Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if
list = {'Barney Google','Snuffy Smith','Dagwood ...
5年以上 前
解決済み
Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...
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...