Answered
Subplot ID in a loop where k> number of plot locations for a single page
Do you mean: q = 1:10 qq = mod(q - 1, 4) + 1 >> 1 2 3 4 1 2 3 4 1 2 Then the...

9 years ago | 1

| accepted

Answered
Is there a simple way to spawn a copy of your current MATLAB workspace into a new process/thread?
What does block the main thread? If you have a bunch of GUIs, the callbacks are processed on demand only. As long as there are n...

9 years ago | 0

| accepted

Answered
Why is my activation key for MATLAB not working?
Most of the members of this forum are voluntary Matlab users. We cannot solve the licence problems. Please use the official inst...

9 years ago | 0

| accepted

Answered
Transferring License to new computer.
You can deactivate Matlab on the old computer and then activate it on the new one. If you mention an error, please post the c...

9 years ago | 0

Answered
Missing text filename string
You did not explain how the file names look like originally. The screenshot looks like e.g. the 2nd file is called: '04-08-...

9 years ago | 1

| accepted

Answered
Can anyone help me to spot the error and how to solve it?
I guess that |STATISTICS(r+1).AVG| or |STATISTICS(r+2).AVG| is not a scalar.

9 years ago | 0

Answered
Is this message important , if so how can i rewrite my script so it no longer appears.
Convert axis([XmaX*1.125, XmiN*1.125, YmaX*1.125, YmiN*1.125]) to axis([XmiN, XmaX, YmiN, YmaX] * 1.125) I've mo...

9 years ago | 2

Answered
Not enough input arguments.
Posting the complete error message and the calling command would reveal the problem. I guess: Either "xa1" or "xa2" is a func...

9 years ago | 1

Answered
Crashing of matlab when i am trying to save a jpg
Did you read and follow the instructions given in the error message already? If this problem is reproducible, please submit ...

9 years ago | 0

Answered
Finding the 3rd largest element in an array.
x = rand(1, 1000); % Method 1: y = sort(x, 'descend'); y(3) % Method 2: y = x; [dum, index] = max(y); ...

9 years ago | 0

Answered
how to transfer a cell array content into ordinal values?
Or simpler: for i=1:217 switch Ystg{i}(2) case {'stage i', 'stage ia'} Stage(i,1) = 1; case {'stage ...

9 years ago | 2

Answered
matlab install in new machine
# Deactivate the license on the old machine. # Install Matlab on the new machine. # Activate Matlab on the new machine.

9 years ago | 0

Answered
How do I solve this
The function is periodic, then you get an infinite number of maxima. Calculating in radians is easier than with degrees. Star...

9 years ago | 0

Answered
Using diff() in a for loop
Did you read the documentation of |diff| already? doc diff It calculates the difference between neighboring elements of ...

9 years ago | 0

| accepted

Answered
hi ı am a master student and I have a home work
The properties 'MajorAxisLength' and 'MinorAxisLength' might be useful. Please try to call |regionprops| with them. I hesitat...

9 years ago | 2

| accepted

Answered
Would you consider actually matlab a smart software ?
Matlab is not smart or efficient. Matlab allows me to solve problems smartly and efficiently. Matlab code can be extremely co...

9 years ago | 0

Answered
How can I read this txt.data in matlab?
fid = fopen('data-ex1.txt', 'r'); if fid == -1 error('Cannot open file.'); end data = fscanf(fid, '%g 1:%g 2:%g'...

9 years ago | 1

Submitted


RunLength
RunLength coding as fast MEX and M-code

9 years ago | 6885 downloads |

5.0 / 5
Thumbnail

Answered
Dynamic variable names(ordered with subscript) in a loop creating new dynamic variables
Don't do this. Do not create variables dynamically and do not hide inidces in th names. Use numerical arrays instead: P ...

9 years ago | 1

| accepted

Answered
what is the command to open new window in gui !
figure Sorry, this answer seems to be trivial. But it is the command to open a new window. Perhaps it helps. If not, please...

9 years ago | 1

| accepted

Answered
Hello, Can you help me to change colour and fontsize using sprintf ?
As Stephen has explained already: |sprintf| creates a string, which is a character vector and doe not contain any information ab...

9 years ago | 1

Answered
Read files from a directory one after the other not by using "dir" command
See Stephen's comment: Using |dir| is the best and only option. It will not slowdown the processing. The struct replied by |dir|...

9 years ago | 0

Answered
Calculate duration from cell with date hours with Matlab 2013a
% [Don't use this - see [EDITED 2] for a nicer solution!] D = {'01/01/2014' '12:00:00' 'AM'; ... '01/01/2014' '06:0...

9 years ago | 1

| accepted

Answered
How can I use C++ to speed up my matlab code ?
Sorry, I cannot resist :-) MyCorrCoeff2 can still be improved by considering the columnwise storing of elements in arrays. Th...

9 years ago | 1

| accepted

Answered
How can I use C++ to speed up my matlab code ?
function H = MyCorrCoeff1(Mat) c = size(Mat,1); nc = (0.5 * c * (c + 1)); H = zeros(nc, nc); % Pre-allocate!!! ...

9 years ago | 0

Answered
How can I use C++ to speed up my matlab code ?
After your <https://www.mathworks.com/matlabcentral/answers/333810-how-can-i-use-c-to-speed-up-my-matlab-code#comment_443743 com...

9 years ago | 0

Answered
I accidentally changed the function of ReadVideo in Matlab2016b, all the procedures suspend.How can I do??
Restore the original file ReadVideo.m from the backup. Either use your standard backup. Under Windows you can apply the "Recent ...

9 years ago | 0

Answered
remove column from image
If it is a 2D image (gray scale): Img = randi([0, 255], 640, 480, 'uint8'); % Example data keep = all(Img, 1); Img2...

9 years ago | 0

| accepted

Answered
(MATLAB TRICK AND SHORTCUTS): I would like to rename all my variables within a script without do it manually one by one
Rename the variable at first to a unqiue name by editing one instance and hitting - I do not remember, perhaps Shift-Return (it ...

9 years ago | 0

Answered
Recursive function for replacing multiple for loops
Why do you want a recursive function? It would be easier to solve this using an index vector: p = 0.2; n = 10; a =...

9 years ago | 2

Load more