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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

Beantwortet
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*')

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
Matlab went to sleep?
Usually this has to do with the path/current folder/license file being on a network drive.

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 4

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

mehr als 11 Jahre vor | 7

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Problem in convert cell to string.
S = reshape(A',1,[]) No reason to convert to and from a cell.

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Help me with matlab code
edit rank And see what it does.

mehr als 11 Jahre vor | 0

Mehr laden