Answered
Outputing a Colormap for 3D printing
You can get the colormap from the figure and then the CData from the surface: fig = figure; s = surf(peaks); cmap = fig.C...

11 years ago | 0

Answered
Best practice for passing large number of constants to function that runs in parfor
What about using <http://www.mathworks.com/matlabcentral/fileexchange/31972-worker-object-wrapper WorkerObjWrapper> to broadcast...

11 years ago | 0

Answered
If only one positive elem per row (rest are 0), then fill both sides of positive element
And just for fun: A=... [0.9 0.1 0 0; 0 0.8 0 0; 0 0.1 0.7 0.1; 0 0 0 0.9]; B = A; sgn = sign(A)==1; B(log...

11 years ago | 1

Answered
Skipping through multiple histograms - one at a time?
The simplest way: Insert a |pause()| which waits for keyboard input: for ii = 1:10 hist(randn(1000,1)); pause en...

11 years ago | 0

| accepted

Answered
2014b editor: How do you move file from one side to the other in left/right view?
When you drag it over, move the mouse around the pane before releasing. Wait until it highlights the outer border (usually arou...

11 years ago | 1

| accepted

Answered
Optimization Tool and Variables
# Yes. Include this command in your ui: >>optimtool However, this won't work in a compiled environment (i.e. if you use...

11 years ago | 0

Answered
Making a *.m file "read only."
MATLAB doesn't have the ability to do this. However, you could use a source control system like SVN or GIT to monitor them. Th...

11 years ago | 0

| accepted

Answered
How do I fit two equations that explain two parts of a curve?
Break the data into two pieces and do the curve fit xlow = x(x<x_end); ylow = y*x<x_end); xhigh = x(x>x_end); % Note you ...

11 years ago | 0

| accepted

Answered
Is 'newplot' the reason why 'image' and 'plot' are no longer working on my computer?
which -all findall My guess is you overloaded |findall| with your own function. The output for the above should look like ...

11 years ago | 0

Answered
How to: simplify statistical commands into fewer lines of code
Instead of creating a matrix for each one, create a |table| ( |readtable| is the function to bring it in from Excel). Now you c...

11 years ago | 1

Answered
Problem with Linprog: it says it is infeasible while it is feasible
Do the bounds make it infeasible?

11 years ago | 0

Answered
Can't access 'image processing toolbox' using R2014b Student edition
Contact Installation Support!

11 years ago | 0

Answered
Using a while loop to call and name files.
You don't _really actually_ want to do that! <http://www.mathworks.com/matlabcentral/answers/57445-faq-how-can-i-create-varia...

11 years ago | 0

Answered
Save values of a matrix after each iteration in a new matrix
Typically one would stick the new matrices in the third dimension of the first or in a cell array. For the 3d case, you would...

11 years ago | 0

| accepted

Answered
Import data as a cell array in a script
Zynk, in the import tool, after you make your selections, there's an option to "Generate function". You could then use this fun...

11 years ago | 1

| accepted

Answered
How to improve saving a scatter plot from three arrays with size 1*508654896
I think you need to consider another kind of plot. Your monitor doesn't even have that many pixels!

11 years ago | 0

| accepted

Answered
MATLAB Coder - Variable Size Matrix Input
The code provides the ability to work with any size in that range so that it does not need to know the size of the inputs (as lo...

11 years ago | 0

Answered
i and j as Variable Names vs Imaginary Unit: What Advice to Give on MATLAB Answers?
* Stephen, I'd say it's a best practice so you're not hurting anything or anyone. Whether it's worth the keystrokes and time fo...

11 years ago | 1

| accepted

Answered
Matlab, Arduino Communication using BytesAvailableFcn Too many input arguments
Using the string syntax for mycallback doesn't allow you to change the inputs. You'll probably want something like this s....

11 years ago | 3

| accepted

Answered
Using MuPAD series inside MATLAB
f = matlabFunction(s) I'm kind of surprised that |formula(s)| doesn't return what you have above. It might be worth contac...

11 years ago | 0

| accepted

Answered
Finding non-unique values in an array.
C = {'\\campus\home\home2014...' 's-pl T2* FGRE' [1] [1] [0] '\\campus\home\home2014...' 's-pl T2* FGRE' [1] ...

11 years ago | 2

| accepted

Answered
How to get symbolic PDF of a statistical distribution in MuPAD?
Evaluate it at a point to get the equation <</matlabcentral/answers/uploaded_files/24852/Capture.PNG>>

11 years ago | 0

Answered
Optimization of one output of a vectorfunction using fminunc
Inside of your objective function, only return that output: function y3 = myobjfun(x) % do whatever y3 = somethin...

11 years ago | 2

| accepted

Answered
passing a function to another function
integral calls the function with a vector x, you're expecting x to be a scalar in your haar function. E.g: >> [1 2 3] && 1...

11 years ago | 1

| accepted

Answered
Using Workspace variables in a GUI matlab
doc evalin The first input to |evalin| should be "Where should it eval in?" I don't see how you can define a workspace. ...

11 years ago | 0

| accepted

Answered
How to multiply -1 with specific vector of a matrix ?
The easiest and likely fastest way to do this would be with a simple |for|-loop over columns. C = A; for ii = 1:size(C,2...

11 years ago | 0

| accepted

Answered
FFT image registration method
<http://www.mathworks.com/help/releases/R2014b/images/ref/imregcorr.html |doc imregcorr|>

11 years ago | 0

Answered
Simplify error in matlab
sin* Is not a valid expression... |sin| is a function that expects inputs: sin(1) What you are doing is sin*(1...

11 years ago | 0

Load more