문제를 풀었습니다


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년 초과 전

문제를 풀었습니다


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

12년 초과 전

문제를 풀었습니다


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년 초과 전

답변 있음
Can I improve visually a GUI?
This is the IDE's view. The GUI, when you run it, could be a little better. And decide whether you need all the components in th...

12년 초과 전 | 0

답변 있음
How to identify buses used within a model
find_system(ModelName,'BlockType','BusCreator'); Be sure to turn follow links, look under mask in your find system query..

12년 초과 전 | 0

| 수락됨

답변 있음
Where the variables,methods and classes are declared in MATLAB.?
I am afraid, your question is a bit to vague to answer. Either attach the files or post lines of code. But if your script works,...

12년 초과 전 | 0

답변 있음
Execute code if m-file runs into error
use try and catch at all suspect instances. This will solve your case. But when you call a blob a script, it should not have ...

12년 초과 전 | 0

| 수락됨

답변 있음
write a MATLAB program to determine the n^th number in the Fibonacci sequence
Homework ain't it? There is a question on the same in Cody. <http://www.mathworks.in/matlabcentral/cody Check out..>

12년 초과 전 | 0

답변 있음
How to extract a period of history of a signal in simulink?
You can use a group of Unit Delay Blocks to do the same. That precisely does what you want.

12년 초과 전 | 1

답변 있음
In GUI how to take input from keyboard?
this is GUI's DE(development Environment). Run the GUI by clicking on the Green Play button at the menu. The GUI will execute. t...

12년 초과 전 | 0

답변 있음
how to mention picoseconds unit of time.
Do you mean this? ps='*1e-12'; eval(['30',ps])%30 picoseconds ans = 3.0000e-011

12년 초과 전 | 0

문제를 풀었습니다


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년 초과 전

문제를 풀었습니다


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

12년 초과 전

문제를 풀었습니다


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

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년 초과 전

답변 있음
Use string as a path
No.. dirs is a cell array of strings. Type whos and you will see dirs ...

12년 초과 전 | 1

답변 있음
how to determine the rows and columns of an image ?
save your imread data in some variable. ImageData=imread('car.jpg'); ImageData will be a 3 D array for Colour Image with...

12년 초과 전 | 1

| 수락됨

문제를 풀었습니다


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

12년 초과 전

문제를 풀었습니다


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

12년 초과 전

질문


Accurately Insert a Block in Simulink Model based on Mouse Position.
Hi, I want to insert a Block into a Simullink Model from Right Click Menu. The block should be inserted into the exact 'positio...

12년 초과 전 | 답변 수: 1 | 0

1

답변

문제를 풀었습니다


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

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년 초과 전

문제를 풀었습니다


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

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년 초과 전

문제를 풀었습니다


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년 초과 전

문제를 풀었습니다


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년 초과 전

문제를 풀었습니다


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

12년 초과 전

문제를 풀었습니다


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

12년 초과 전

더 보기