Feeds
답변 있음
how to preallocate large logical array
I am not sure in which release it started working but at least in R2018a A = zeros(50,50,50,50,50, 'logical'); works.
how to preallocate large logical array
I am not sure in which release it started working but at least in R2018a A = zeros(50,50,50,50,50, 'logical'); works.
6년 초과 전 | 1
문제를 풀었습니다
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...
거의 12년 전
문제를 풀었습니다
Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...
12년 초과 전
문제를 풀었습니다
How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...
12년 초과 전
문제를 풀었습니다
Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...
12년 초과 전
문제를 풀었습니다
Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
12년 초과 전
문제를 풀었습니다
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:...
12년 초과 전
문제를 풀었습니다
Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
12년 초과 전
문제를 풀었습니다
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
12년 초과 전
문제를 풀었습니다
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
12년 초과 전
문제를 풀었습니다
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...
12년 초과 전