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

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 1

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

más de 11 años hace | 0

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

más de 11 años hace | 0

Respondida
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)]

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 1

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

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

más de 11 años hace | 0

Cargar más