Réponse apportée
repeat a random function on matlab every 2 minutes
T = timer('Period',120,... %period 'ExecutionMode','fixedRate',... %{singleShot,fixedRate,fixedSpacing,fixedDelay} ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Code optimization (3 line function)
If you have MATLAB Coder, this could be a potentially good candidate for C code generation and MEXing. It involves a loop with ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
How can I write all month's last dates for a given period of time?
You could use |lbusdate| to get the last business day of the month specifying no weekend days: weekend = zeros(1,7); % that...

plus de 11 ans il y a | 0

Réponse apportée
How can I change the color of an alphaShape object when using plot?
You can grab the handle to the patch objects making up the alpha shape as the output from plot and then change whatever properti...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Matlab finding builtin file before class method file of same name
The @signal/filter will only run on an object of type "signal" I.e. sig = signal; % Make a signal, however it's done fi...

plus de 11 ans il y a | 0

Réponse apportée
Break a code in intermediate function
>>dbstop in my_function at 15 Or click the - next to the line number in the editor. Doc: >>web(fullfile(docroot, 'mat...

plus de 11 ans il y a | 0

Réponse apportée
Determine Equality and Find Command
One = sign sets, two compares. Break it down into pieces: [1 2 3 3 pi] == 3 The result is a logical vector. Find then ...

plus de 11 ans il y a | 0

Réponse apportée
Is it possible to get MATLAB to automatically associate legend icon colors with the applicable data?
Legend has the ability to pass in specific line objects to be legend-ized. Here, you throw away those lines in the for-loop. I...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Include MATLAB output in LaTeX document?
You can publish to Latex and then copy it: <http://www.mathworks.com/help/releases/R2014b/matlab/matlab_prog/specifying-outpu...

plus de 11 ans il y a | 0

Réponse apportée
how to draw a symbolic function beside some dots
Works fine for me. Make sure your limits include the points: ezplot(@(x)1./x) hold on plot(rand(1,10),rand(1,10),'r*')

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Pass variables to the workspace from a function
function z = addtwo(x,y) z = x+y; Then call it: zz = addtwo(1,3) If you want to stop inside of addtwo, put a br...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Is it poosible to keep columns in a GUI uitable visible at all times while scrolling to see theother columns?
You would have to use two uitables, one for the first two columns and a second for the rest.

plus de 11 ans il y a | 0

Réponse apportée
when run the program in multi-objective optimization Show error "vec" undefined
|vec| is not a function that MATLAB ships. Did you get the code from someone? It's possible they have a |vec| utility lying ar...

plus de 11 ans il y a | 0

Réponse apportée
problem in image resizing when shown in axes?
How big was the original? Of course it's going to lose resolution if you remove pixels (i.e. 50x50 is smaller than what you sta...

plus de 11 ans il y a | 0

Réponse apportée
My functin wont run my if statement. How do I fix this?
How can x by greater than or equal to 100 and less than 10? It can't. Perhaps you meant or |||| instead of and &&, or maybe...

plus de 11 ans il y a | 0

Réponse apportée
problem of function handles, thx
You need an @ before myfunc, otherwise it tries to evaluate it: @myfunc % reference to function myfunc; do not evaluate ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Checking for Pythagoric Triplets
This should work: isPythTrip = @(x)any(any(bsxfun(@eq,(bsxfun(@(x,y)hypot(x,y),x.',x)),circshift(x,[0 1])))) isPythTrip...

plus de 11 ans il y a | 0

Réponse apportée
Combine files into a CSV
doc dir doc fopen doc fgetl doc fprintf doc fclose Use dir to find the three files to read. Fopen the files for read...

plus de 11 ans il y a | 0

Réponse apportée
histogram and plot at the same
histogram(randn(1000,1)) hold on plot(-6:6,abs(sin(-6:6)*100)) In R2014b. In R2014a and earlier use |hist()| instead of ...

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
Matlab went to sleep?
Usually this has to do with the path/current folder/license file being on a network drive.

plus de 11 ans il y a | 1

Réponse apportée
How can I specify the toolboxes that my standalone application uses?
You shouldn't need any toolboxes to run a standalone application, that's the whole point of compiling it in the first place. ...

plus de 11 ans il y a | 0

Réponse apportée
nested function call using inputname crashes matlab
If the crash is not happening in debug mode, this implies that somewhere an event is not being flushed properly. Add a |drawnow...

plus de 11 ans il y a | 1

Réponse apportée
program not working in newer version of matlab
That is not a command that ships with MATLAB but rather one that you got from someone else or downloaded or wrote. On the machi...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
How to store value of rand() function in a file?
Or: matlab.io.saveVariablesToScript If you want a runnable script.

plus de 11 ans il y a | 0

Réponse apportée
Control errorbar width in Matlab R2014b
Pre-R2014b, this was possible because the errorbar series had children which were lines you could adjust. Since that's no longe...

plus de 11 ans il y a | 4

Réponse apportée
Slow or Laggy Matlab Workspace
Is your current directory either: # Full of thousands of files? # On a network? These two reasons are often the cause of ...

plus de 11 ans il y a | 7

| A accepté

Réponse apportée
How to delete a row by the last column variable
x(strcmp(x(:,end),'F32132'),:) = []; x of the rows with last column in x equal to 'F32132' set all columns to empty.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Problem in convert cell to string.
S = reshape(A',1,[]) No reason to convert to and from a cell.

plus de 11 ans il y a | 0

Réponse apportée
how to emulate "hold on" in 2014b
<http://www.mathworks.com/matlabcentral/answers/165787-how-can-i-get-the-pre-2014b-behavior-of-hold-on> Or you can set the ax...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Help me with matlab code
edit rank And see what it does.

plus de 11 ans il y a | 0

Charger plus