문제를 풀었습니다


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

거의 12년 전

문제를 풀었습니다


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

거의 12년 전

문제를 풀었습니다


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

거의 12년 전

질문


Huge different between MatLab and operating systems?
http://www.mathworks.com/matlabcentral/answers/42564-matlab-have-memory-leaks In the thread above, it was suggested that sinc...

거의 12년 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Return the 3n+1 sequence for n
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...

거의 12년 전

문제를 풀었습니다


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

거의 12년 전

문제를 풀었습니다


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

거의 12년 전

질문


Change what folder matlab starts up with
Ok this is probably a stupid question but nothing I found on the internet works for me. When you start up MatLab there's the cur...

거의 12년 전 | 답변 수: 2 | 0

2

답변

질문


Force matlab to quit while stuck in an infinite loop?
I found some newsgroup postings from about 4 years ago and back then there was no way to terminate a script from running in a in...

거의 12년 전 | 답변 수: 3 | 2

3

답변

질문


Chars with white space
Using xmlread() I found that MatLab adds a lot of white space into the project for whatever reason. But I get values when I read...

거의 12년 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

거의 12년 전

문제를 풀었습니다


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

거의 12년 전

문제를 풀었습니다


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

거의 12년 전

문제를 풀었습니다


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

거의 12년 전

문제를 풀었습니다


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

거의 12년 전

문제를 풀었습니다


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

거의 12년 전

문제를 풀었습니다


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

거의 12년 전

문제를 풀었습니다


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

거의 12년 전

문제를 풀었습니다


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

거의 12년 전

문제를 풀었습니다


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...

거의 12년 전

문제를 풀었습니다


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

거의 12년 전

문제를 풀었습니다


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

거의 12년 전

문제를 풀었습니다


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

거의 12년 전

질문


Get line properties from it's handle
I’m trying to get a lines property from its handle. I do this to get the handle to the line: lines = get_param(outPorts{i},...

거의 12년 전 | 답변 수: 1 | 0

1

답변

질문


Use add_line on a line?
I was wondering if you could get a handle from a line and draw a line from that to something else. Kaustubha helped me with the ...

거의 12년 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

거의 12년 전

문제를 풀었습니다


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 ...

거의 12년 전

질문


Any way to figure out what your blocks are connected to in a model?
inPorts = find_system(modelName,'SearchDepth',2,'BlockType','Inport'); outPorts = find_system(modelName,'SearchDepth',2,'Bl...

거의 12년 전 | 답변 수: 1 | 1

1

답변

질문


replace_block and load_system
I have 2 questions, first being: 1. Can replace_block replace blocks with custom made blocks? I'm having some trouble with th...

거의 12년 전 | 답변 수: 1 | 0

1

답변

문제를 풀었습니다


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

거의 12년 전

더 보기