Answered
List Box in GUI
Hi, you could do the following if I understood the question correclty: allStrings = get(handles.listbox1, 'string'); ...

14 years ago | 0

Answered
Compile a 32-bit shared library from a 64-bit Linux machine with 64-bit MATLAB installed
Hi, it's at least difficult, but I guess probably not possible at all. It will definetely simpler to just install a 32 Bit MA...

14 years ago | 1

| accepted

Answered
??? Undefined function or variable 'matlabrc'
Hi, in the folder <matlab>\toolbox\local there should be two files which might be affected: pathdef.m and matlabrc.m. Are the...

14 years ago | 0

Answered
Why the computing time of a function is bigger than main fuction?
Hi Volker, hmm, it's not a deep copy that happens here. To see, that the operation indeed is done inplace can be seen when us...

14 years ago | 2

Answered
Processor usage
Hi Juan, in the (are you using Windows?) taskmanager you can assign a process (i.e. MATLAB) to run on one (or more) cores. Do...

14 years ago | 0

Answered
Why the computing time of a function is bigger than main fuction?
Hi Volker, which version of MATLAB are you using? For me (R2012a) both your and Jan's version give more or less the same resu...

14 years ago | 0

Answered
Get Rate transition Block Behavior from M-File
Hi Khoubeib, I don't understand: the rate transition block is only needed for multirate systems that are supposed to run in a...

14 years ago | 0

Answered
Processor usage
Hi Juan, this is indeed most likely a multithreading issue: unless you are using the Parallel Computing Toolbox ("explicit pa...

14 years ago | 0

Answered
Exiting: One or more of the residuals, duality gap, or total relative error has grown 100000 times greater than its minimum value so far:
Hi, I guess (!) you are using linprog and get this error message? In this case the combination of bounds, equality constraint...

14 years ago | 1

| accepted

Answered
How to include libraries in a mex file
Hi, I see. I would suggest the following: int *pr; [...] // this is the result from the function: partitions = ...

14 years ago | 0

Answered
How to include libraries in a mex file
Hi, you don't need to change your code. Yes, the mex interface is with void, but there is nothing wrong doing something like ...

14 years ago | 0

Answered
improve condition number of a matrix to inverse it
Hi Sakineh, in this general sense: no. You will need to explain in more detail where the matrix comes from, and what you are ...

14 years ago | 0

| accepted

Answered
Regarding "fwrite" in matlab
O.K., I give it another try: x = 42; fprintf(fid, '%s\n', dec2bin(x, 16)); Is that what you need? Titus

14 years ago | 0

| accepted

Answered
efficient way to rename files while preserving first 5 letters and removing the rest
Hi, get the list of files using e.g. dir: files = dir('*.txt'); Then a simple function to use is fileparts for i...

14 years ago | 4

| accepted

Answered
Efficient Row x Collumn multiplication
Hi, don't know if it is really more efficient, give it a try: x = dot(A',B)' Titus

14 years ago | 0

Answered
storing data into a vector within nested for loop
Hi, usually I would not use a loop for this kind of operations: do the following instead: [Xcount, Ycount] = meshgrid(1:...

14 years ago | 1

| accepted

Answered
Regarding "fwrite" in matlab
Hi Aparna, are you sure you want to use fwrite? With fwrite you write binary data (open your M1.txt with an editor that can d...

14 years ago | 0

Answered
How to add small image to GUIDE panel
Hi Joe, you can add an axis to your GUI, make it size 64x64 and in the opening function of your GUI use imread to read the im...

14 years ago | 0

| accepted

Answered
How do I run a simulink model in real-time in normal mode
Hi Behel, not sure, if I fully understand: Real-Time Windows Target is a compiled Simulink model. The model runs in real-time...

14 years ago | 0

Answered
Two ascii data files of minute data not matching up
Hi, if I understand correctly, this is close to what you want to do...? % the first set: t1 = datenum(2012, 3, 1) + [1;...

14 years ago | 0

Answered
How to constrain lsqnonlin not to give me negative values???
Hi, you should define 0 as lower bound for all the variables, i.e. [rs, res] = lsqnonline(@OutInpDiff, X0, zeros(1,4), [...

14 years ago | 0

Answered
How to run a outside function inside a GUI m file?
Hi, most often it's one of the following: * config.m is in another folder (if so, add the folder to the MATLAB path using...

14 years ago | 0

| accepted

Answered
Two ascii data files of minute data not matching up
Hi, you will only find a "good" way to do this, if the ascii files have also the time information stored. If this is the case...

14 years ago | 0

Answered
quit doesn't quit the matlab when called from a loop.
Hi, never thought about this way of doing this. You could try to do the following: !matlab -r test=1 & Note the & at ...

14 years ago | 1

| accepted

Answered
object function iteration gets stuck
Hi, what you see is the stack trace, i.e., fminsearch calls fitmeson, fitmeson calls massp etc. Take a look at the top most ...

14 years ago | 0

Answered
Real-time data exchange
I guess you could use memmapfile in both MATLAB instances to use a (memory mapped) file for exchanging data. Since labbarrier/la...

14 years ago | 0

Answered
Specify one dimension as variable size in Matlab Coder
Hi, I guess you mean the MATLAB Coder project settings? When you specify the input variable, use a ":" to specify a variable ...

14 years ago | 0

| accepted

Answered
Find the row of a word in a file
Hi Panos, to read a number instead of a string, use textscan again but replace the %s by %f: let's say sFound is the line. Th...

14 years ago | 0

Answered
object function iteration gets stuck
Hi, what happens If you hit Ctrl-C? Do you see an error message that tells you, where you interupted the calculation? If yes,...

14 years ago | 0

Answered
help with plz
Hi, if y and x are vectors, then abs((y./K)-x)<1e-5) is a (logical) vector as well. You will need to decide, if the relation ...

14 years ago | 0

| accepted

Load more