Answered

32 bit mex file not working in a 64 bit version of matlab

This is a stab in the dark, but a Google search found <https://github.com/filipjares/tdv/tree/master/src/gcs/private this on Git...

32 bit mex file not working in a 64 bit version of matlab

This is a stab in the dark, but a Google search found <https://github.com/filipjares/tdv/tree/master/src/gcs/private this on Git...

6 years ago | 2

Answered

Tranform Python code in Matlab

MATLAB is 1-indexed, so I think you're looking for something like: diff = X(pairs(:,1),:) - X(pairs(:,2),:);

Tranform Python code in Matlab

MATLAB is 1-indexed, so I think you're looking for something like: diff = X(pairs(:,1),:) - X(pairs(:,2),:);

6 years ago | 0

Answered

Read in file that has raw binary image data and an XML footer

You've got the right idea. Since you know the size of the image, open the mixed image/XML file with <http://www.mathworks.com...

Read in file that has raw binary image data and an XML footer

You've got the right idea. Since you know the size of the image, open the mixed image/XML file with <http://www.mathworks.com...

6 years ago | 0

| accepted

Answered

how to select a number randomly from a series of fixed number

>> a(randi(numel(a))) In other words, pick a random (integer) number _N_ between 1 and the number of elements in "a", then r...

how to select a number randomly from a series of fixed number

>> a(randi(numel(a))) In other words, pick a random (integer) number _N_ between 1 and the number of elements in "a", then r...

6 years ago | 0

| accepted

Answered

Why can parfor only write to one dimension?

From parfor's perspective, "result" is being accessed randomly. Try this instead: parfor i=index results1{i} = an...

Why can parfor only write to one dimension?

From parfor's perspective, "result" is being accessed randomly. Try this instead: parfor i=index results1{i} = an...

6 years ago | 0

Answered

How to do better commenting in Matlab script?

You'll get to the settings you need under "Home -> Preferences -> Editor/Debugger -> Display" and "Home -> Preferences -> Editor...

How to do better commenting in Matlab script?

You'll get to the settings you need under "Home -> Preferences -> Editor/Debugger -> Display" and "Home -> Preferences -> Editor...

6 years ago | 0

Answered

Generating a mex file from .m file

It looks like your system does not have the GNU C++ standard library installed. I believe this can be the case in some down dis...

Generating a mex file from .m file

It looks like your system does not have the GNU C++ standard library installed. I believe this can be the case in some down dis...

6 years ago | 0

Answered

How can I setup MATLAB to differentiate things like recent directories and command histories for two unrelated projects?

I don't think there is direct support for like this you describe. Path management can be semi-automated with scripts, but comma...

How can I setup MATLAB to differentiate things like recent directories and command histories for two unrelated projects?

I don't think there is direct support for like this you describe. Path management can be semi-automated with scripts, but comma...

6 years ago | 0

| accepted

Answered

Bug in matlab 2013b: all windows resize (get very small) when I right click in the Editor. It returns to normal only when program is restarted.

See <http://www.mathworks.com/matlabcentral/answers/122347-matlab-editor-windows-and-fonts-resize-get-smaller-on-right-click-why...

Bug in matlab 2013b: all windows resize (get very small) when I right click in the Editor. It returns to normal only when program is restarted.

See <http://www.mathworks.com/matlabcentral/answers/122347-matlab-editor-windows-and-fonts-resize-get-smaller-on-right-click-why...

6 years ago | 0

Answered

Why Matlab window gets smaller pressing right mouse button?

See <http://www.mathworks.com/matlabcentral/answers/122347-matlab-editor-windows-and-fonts-resize-get-smaller-on-right-click-why...

Why Matlab window gets smaller pressing right mouse button?

See <http://www.mathworks.com/matlabcentral/answers/122347-matlab-editor-windows-and-fonts-resize-get-smaller-on-right-click-why...

6 years ago | 0

Answered

what is meant by this error" Dispatch Exception"?

That error is coming from Excel. Try basic mode: xlsread('extract2006.xlsx','foidev2006','','basic') Does this fare any ...

what is meant by this error" Dispatch Exception"?

That error is coming from Excel. Try basic mode: xlsread('extract2006.xlsx','foidev2006','','basic') Does this fare any ...

6 years ago | 1

Answered

parallel computing speed question when the body of the parfor loop takes about 2 seconds

It really depends on what "dosomething" is doing. If it is pure computation, it should be a big win. If there is file or netwo...

parallel computing speed question when the body of the parfor loop takes about 2 seconds

It really depends on what "dosomething" is doing. If it is pure computation, it should be a big win. If there is file or netwo...

6 years ago | 0

| accepted

Answered

How to selectively import a column from a text file containing lot of headers

You can import all 57 columns with the following: txt=fileread('1.TXT'); % Read 57 numeric columns of data textscan(txt,...

How to selectively import a column from a text file containing lot of headers

You can import all 57 columns with the following: txt=fileread('1.TXT'); % Read 57 numeric columns of data textscan(txt,...

6 years ago | 2

| accepted

Answered

Simplify large for loop running average.

I've used the <http://www.mathworks.com/help/matlab/ref/filter.html filter> function perform moving average calculations -- seve...

Simplify large for loop running average.

I've used the <http://www.mathworks.com/help/matlab/ref/filter.html filter> function perform moving average calculations -- seve...

6 years ago | 0

Answered

I do not know why I am getting an error, i am trying to hand in this project but i will get a zero if the code can not be read. Please help me.

You cannot put function declarations inside a MATLAB script. Cut 'n' paste each function into its own file, naming the files p2...

I do not know why I am getting an error, i am trying to hand in this project but i will get a zero if the code can not be read. Please help me.

You cannot put function declarations inside a MATLAB script. Cut 'n' paste each function into its own file, naming the files p2...

6 years ago | 0

Answered

How to divide a matrix into smaller matrices

Try <http://www.mathworks.com/matlabcentral/answers/89757-how-to-divide-256x256-matrix-into-sixteen-16x16-blocks this Answer>. ...

How to divide a matrix into smaller matrices

Try <http://www.mathworks.com/matlabcentral/answers/89757-how-to-divide-256x256-matrix-into-sixteen-16x16-blocks this Answer>. ...

6 years ago | 0

Answered

I do not understand this error message

MATLAB is trying to preform matrix multiplication when I think you want element-by-element multiplication instead. Replace * (a...

I do not understand this error message

MATLAB is trying to preform matrix multiplication when I think you want element-by-element multiplication instead. Replace * (a...

6 years ago | 0

Answered

How to read a console data

Do you mean the text created by something you run on the command line? Use the system command's second output argument: >> ...

How to read a console data

Do you mean the text created by something you run on the command line? Use the system command's second output argument: >> ...

6 years ago | 0

Answered

xlsread unable to import data or sorts the imported data. please advice.

Nitin, I was able to load this 20 times in a row without issue. But, I am on Mac, which uses quite a different code path than a...

xlsread unable to import data or sorts the imported data. please advice.

Nitin, I was able to load this 20 times in a row without issue. But, I am on Mac, which uses quite a different code path than a...

6 years ago | 0

| accepted

Answered

Using matlab command from VS2013/C++ system() call to exeute a script - fprintf issue

You self-diagnosed well. Windows' working folder is different in the two scenarios. When you start MATLAB *not* from the Start...

Using matlab command from VS2013/C++ system() call to exeute a script - fprintf issue

You self-diagnosed well. Windows' working folder is different in the two scenarios. When you start MATLAB *not* from the Start...

6 years ago | 0

| accepted

Answered

How to change certain lines in a file?

As Per states, you can't edit an existing file unless the changes are exactly the same size (number of bytes) as the original, w...

How to change certain lines in a file?

As Per states, you can't edit an existing file unless the changes are exactly the same size (number of bytes) as the original, w...

6 years ago | 0

Answered

xlsread unable to import data or sorts the imported data. please advice.

I can answer question #2, I think. If you have two separate variables and you sort one, then, yes, the two variables will now b...

xlsread unable to import data or sorts the imported data. please advice.

I can answer question #2, I think. If you have two separate variables and you sort one, then, yes, the two variables will now b...

6 years ago | 0

Answered

64 bit matlab coder and Visual Studio compiler.

Visual C++ 2013 include a 64-bit compiler, it should work just fine. <http://www.mathworks.com/support/compilers/R2015a/index...

64 bit matlab coder and Visual Studio compiler.

Visual C++ 2013 include a 64-bit compiler, it should work just fine. <http://www.mathworks.com/support/compilers/R2015a/index...

6 years ago | 0

Answered

How can I stop a user defined function from returning the output twice?

You don't have semicolons at the end of some lines (so output of those lines will be displayed). Maybe it is running once, but ...

How can I stop a user defined function from returning the output twice?

You don't have semicolons at the end of some lines (so output of those lines will be displayed). Maybe it is running once, but ...

6 years ago | 1

| accepted

Answered

C++ to matlab(m-file) without mex

You can use <http://www.mathworks.com/help/matlab/ref/fprintf.html fprintf> in MATLAB, which is closer in usage to C than C++: ...

C++ to matlab(m-file) without mex

You can use <http://www.mathworks.com/help/matlab/ref/fprintf.html fprintf> in MATLAB, which is closer in usage to C than C++: ...

6 years ago | 1

Answered

== operator says two identical arrays aren't the same

Floating point numbers are not infinitely precise, and you probably have differences too small to be noticed when displaying onl...

== operator says two identical arrays aren't the same

Floating point numbers are not infinitely precise, and you probably have differences too small to be noticed when displaying onl...

6 years ago | 1

| accepted

Answered

Merging multiples csv files in Matlab-R2014b

Assuming the files are all in the same folder and you have 'cd'ed to there, trying something like: files = dir('*.csv'); % ...

Merging multiples csv files in Matlab-R2014b

Assuming the files are all in the same folder and you have 'cd'ed to there, trying something like: files = dir('*.csv'); % ...

6 years ago | 2

| accepted

Answered

[Noob] Blank data -> NaN

I'm not familiar with portopt, so this will be general advise: You can de-NaN a vector of numbers with logical index: >> ...

[Noob] Blank data -> NaN

I'm not familiar with portopt, so this will be general advise: You can de-NaN a vector of numbers with logical index: >> ...

6 years ago | 0

| accepted

Answered

Matlab 2014b mex switch C compiler from XCode Clang to GCC on Mac

Sorry, MEX only supports Xcode/Clang on Mac. See <http://www.mathworks.com/support/compilers/R2014b/index.html?sec=maci64>

Matlab 2014b mex switch C compiler from XCode Clang to GCC on Mac

Sorry, MEX only supports Xcode/Clang on Mac. See <http://www.mathworks.com/support/compilers/R2014b/index.html?sec=maci64>

7 years ago | 0

| accepted

Answered

Problems with 2014b running EXTREMELY slowly on Mac OS?

This is all on the same computer, right? I would expect R2012b and R2014b to have comparable performance on your Mac. Try some...

Problems with 2014b running EXTREMELY slowly on Mac OS?

This is all on the same computer, right? I would expect R2012b and R2014b to have comparable performance on your Mac. Try some...

7 years ago | 0