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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

Mehr laden