답변 있음
TCP/IP communication problem
You can ignore the File System error, it means simply that it can't find a usable file system. For most activities, you will not...

10년 초과 전 | 0

| 수락됨

답변 있음
How to get sample time of the model through scrip?
get_param(gcs, 'FixedStep') This will only work for fixed step solvers. Note that the result returned is a string.

10년 초과 전 | 0

| 수락됨

답변 있음
MEX in Matlab 8.1 , 64 bit & Windows 7, 64 bit
The errors you are getting are from the C++ compiler (i.e. they appear to be C++ errors and not mex errors); I would suggest loo...

10년 초과 전 | 0

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

10년 초과 전

답변 있음
Need help on xPC target with I/O card
You will not need to set anything up beyond plugging the board in.

10년 초과 전 | 0

| 수락됨

문제를 풀었습니다


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

10년 초과 전

답변 있음
Building a memory with m-file
You need to declare these variables as "persistent". You can check |isempty| of these variables for initialization. functi...

10년 초과 전 | 0

| 수락됨

답변 있음
Code generation from level-2 s-function without tlc-file
In order to use this with code generation, *everything* you call must be in C (i.e. no M). The only exception would be if you we...

10년 초과 전 | 0

| 수락됨

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

10년 초과 전

문제를 풀었습니다


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

10년 초과 전

문제를 풀었습니다


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

10년 초과 전

답변 있음
Code generation from level-2 s-function without tlc-file
You can either write a C S-function, or add a simple TLC file for your MATLAB S-function. The TLC file could be as simple as cal...

10년 초과 전 | 0

문제를 풀었습니다


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

10년 초과 전

문제를 풀었습니다


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

10년 초과 전

문제를 풀었습니다


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

10년 초과 전

답변 있음
What are the timings for xPC Target I/O
For both the analog and digital signals, the actual reading/writing is done in the block; so this happens when the block execute...

10년 초과 전 | 0

문제를 풀었습니다


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

답변 있음
xPC Target Explorer Error: Attempting to access the property or method of an invalid object
There may be an issue with your RS232 setup. Are you sure you are using a NULL Modem cable? Without this, you won't be able to c...

10년 초과 전 | 0

| 수락됨

답변 있음
problem with real time udp in xPC target 5.5 when using the Intel-Gigabit ethernet adapter
I think both your host-target communication and real-time UDP are trying to use the same card. For diagnostics, I would try the ...

10년 초과 전 | 0

답변 있음
Basic question regarding xPC target setup
# The crossover cable is not the same as used to connect to the LAN; you need a differently wired cable. This can be purchased q...

10년 초과 전 | 1

| 수락됨

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Is my wife right?
Regardless of input, output the string 'yes'.

10년 초과 전

더 보기