Answered
Why does this axes handle become invalid
My guess (since the whole thing won't run) is: subplot(2, 1, 1) Draws a new axes and erases the old.

11 years ago | 0

Answered
Adding full figure edit options to an executable?
Plottools Plotedit etc. aren't supported by Compiler, you'll have to rebuild them yourself if you want the end user to have this...

11 years ago | 0

| accepted

Answered
How to use the generated Neural Fitting Matlab function using "Deploy Solution"...
First, don't call it function because that's a keyword. Second, the most common reason I see that is because of a missing trans...

11 years ago | 0

| accepted

Answered
How do you fit a curve through 3D points, using splines, constrained within a volume.
Here are my thoughts: If the curve you're trying to fit is linear, <http://www.mathworks.com/help/releases/R2015a/optim/ug/ls...

11 years ago | 1

Answered
fmincon output suppresion help
options = optimoptions('fmincon','display','none') fmincon(etc...,options) For more options: doc optimoptions ...

11 years ago | 0

| accepted

Answered
Creating a 3-dim matrix from an array and a 2-dim matrices array
Close! but using :,: means that it must fill the whole thing, not pad with zeros. Instead, only fill to the size: for i...

11 years ago | 0

| accepted

Answered
Sorting/Arranging Data Sections in one 48772x15 matrix
You could absolutely do this with a |for|-loop and if else. Here's a vectorized approach that bins based on index directly: ...

11 years ago | 0

Answered
How to add two vectors or arrays with different length?
idx = a~=0; a(idx)+b(idx)

11 years ago | 0

Answered
How to simulate train arrivals and track occupation at a station?
This sounds like a really good application for <http://www.mathworks.com/products/simevents/ SimEvents>. SimEvents allows you t...

11 years ago | 0

Answered
option faster than unique?
Perhaps I'm missing something but on my machine (fairly wimpy laptop) this is taking a few hundredths of a second tic for ...

11 years ago | 0

Answered
how to use command"matlabFunction" in loop and handle function in loop
Use cells to store the function handles syms x y rr=[x^2+y^2,x^2+1,y^2+2,3*x^3; y^7+2,x^2+y,x^4+y^7,2] f = cell...

11 years ago | 0

Answered
Create a folder for each iteration and save workspace and figures
doc mkdir doc fullfile doc save doc hgsave

11 years ago | 0

Answered
Is there any way to set time limit on a function?
Pass |tic| into the function and have it check |toc| periodically. If it exceeds, |return| or |error|.

11 years ago | 1

Answered
Evaluate double integral using trapezoidal rule
How about instead of re-linspacing: y = pi*x/2

11 years ago | 0

Answered
How to draw voxel image?
doc isosurface Is probably a good first bet

11 years ago | 0

Answered
How do I create a matrix with three variables?
With simple indexing: w = 7; % width h = 9; % height f = randi(9,1); % random M = [0 1:w; (1:h).' repmat(f,h,w)]

11 years ago | 0

Answered
Generate a random number with specific probability density function
<http://www.mathworks.com/help/releases/R2015a/stats/slicesample.html |slicesample|> will do this for you.

11 years ago | 0

Answered
assign summary of a category to new variables
Or c = categorical({'plane'; 'car'; 'train'; 'car'; 'plane'}) b = table(categories(c),countcats(c))

11 years ago | 1

Answered
Variables with especific posible values
Here's a small example with synthetic values and variable names: % c is independent, cdep is dependent on c c = [0 25 90...

11 years ago | 0

Answered
different result of unchanged script after restart of Matlab (symbolic)
Whenever you run any command without assigning its output to a variable, the output is assigned to _ans_ >>5 >>magic...

11 years ago | 0

Answered
plotbrowser('on');plottools('on'); in a deployed app
Because interactive editing tools like plottools cannot be deployed. In general things like plot tools the Apps in the apps...

11 years ago | 0

Answered
Which toolbox to read from bluetooth devices?
You would need the instrument control toolbox: <http://www.mathworks.com/help/releases/R2015a/instrument/bluetooth.html>

11 years ago | 0

| accepted

Answered
How do I use a 2D logical index matrix to change a subset of a 3D array?
Why not just use a for loop over slices...?

11 years ago | 0

Answered
fprintf error inside function?
|fprintf| not |fprinf| :)

11 years ago | 0

| accepted

Answered
Is there a way to use setdiff or any function to compare two data sets within a range of each other?
Starting in R2015a, there is a function <http://www.mathworks.com/help/matlab/ref/ismembertol.html |ismembertol|>. You can use ...

11 years ago | 0

| accepted

Answered
Speed up launch of a MATLAB standalone executable
Not without using MATLAB production server which keeps a bunch of deployed components in a hot state ready to service orders as ...

11 years ago | 0

| accepted

Answered
How to read multiple text files in a folder and create a cell array?
If the files are all the exact same format, you might have some luck with |datastore| as well (new in r2014b). doc datastor...

11 years ago | 0

Answered
Creating variable number of for loops
I would just use two loops, one to loop over a and one to loop on each element of a: a = [2 3 3]; for aloop = 1:numel(...

11 years ago | 0

| accepted

Answered
How to read multiple text files in a folder and create a cell array?
Instead of sprintf, use num2str to build a string that always has the same length num2str(ii,'%05i') (or 6i, your examp...

11 years ago | 0

Answered
How to detect ~ in output argument list, so as to avoid memory allocation inside called function
Pass in an extra input parameter as a flag that the function can use to dictate the expected behavior.

11 years ago | 0

Load more