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

mer än 10 år ago | 0

| accepted

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

mer än 10 år ago | 0

| accepted

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

mer än 10 år ago | 0

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

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

mer än 10 år ago | 0

| accepted

Solved


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

mer än 10 år ago

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

mer än 10 år ago | 0

| accepted

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

mer än 10 år ago | 0

| accepted

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

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

mer än 10 år ago | 0

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

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

mer än 10 år ago | 0

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

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

mer än 10 år ago | 0

| accepted

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

mer än 10 år ago | 0

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

mer än 10 år ago | 1

| accepted

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Solved


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

mer än 10 år ago

Load more