Answered
Is it possible to generate random integers without repitition with every MATLAB startup
See <https://www.mathworks.com/help/matlab/math/why-do-random-numbers-repeat-after-startup.html> and <https://www.mathworks.com/...

9 years ago | 0

| accepted

Answered
How to count the time interval at which a particular number occurs in matrix
Perhaps: With <https://www.mathworks.com/matlabcentral/fileexchange/41813-runlength FEX: RunLength>: a = [1,2,999,999,3,45,...

9 years ago | 0

Answered
QR method iteration of matrix
Is it the normal QR-decomposition qr(A) Yes. A more precise answer is possible, if you mention, which problem you want to...

9 years ago | 0

Answered
the second call back function does not work in gui .could any one help me?
* Please do not only state "does not work", but explain what you see. do you get an error message or do the results differ from ...

9 years ago | 1

| accepted

Answered
I want to read text file with string in the middle of file
nColumn = 3; nLine = 200; fid = fopen(FileName, 'r'); if fid == -1, error('Cannot open file: %s', FileName); end ...

9 years ago | 0

Answered
How to change the subplot positioning in an existing figure?
This swaps the positions of the two axes: hFig = gcf; hAxes = findobj(allchild(hFig), 'flat', 'Type', 'axes'); a...

9 years ago | 1

| accepted

Answered
GUI automatically removes elements from variables when selected
This would happen, if a book is touching the backspace key of you laptop keyboard. I've never seen a case, in which Matlab re...

9 years ago | 1

Answered
Run function with multiple arguments in terminal
Is the installation folder of Matlab in your PATH? If not: /Applications/MyMATLAB/MATLAB_R2015a.app/bin/matlab -r "yourFunc...

9 years ago | 0

Answered
How to find character data in cell array and write in single column
The shown code is not valid Matlab, such that I guess, you mean this: A = {' ', ' ', 'Smith', ' ' ; ... 'False', ' ...

9 years ago | 0

Answered
How can I generate random numbers in a range with decimal steps?
randi([0, 5]) / 10

9 years ago | 4

Answered
how to get rgb from this tiff image file?
Itrain = double(imread('zh12.tif')); figure for k = 1:4 Itrain(:, :, k) = Itrain(:, :, k) / max(max(Itrain(:, :, k)...

9 years ago | 0

Answered
i have a problem in arabic handwritting recognition, no error from the codes but the outputs are wrong. what possibly the cause of it?
We have to clarify how assistence is possible. Did you read <https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-t...

9 years ago | 0

| accepted

Answered
why my stand alone toolbox is not working ?
You have to find out any details. We cannot guess, what has happened on the computer. Perhaps the Matlab or compiler runtimes ha...

9 years ago | 0

Answered
How can I read in data and sparse each column into vectors with the saved variable name?
label(i)=asec(:,i); does *not* assign the value |asec(:, i)| to the variable whose name is store in |label(i)|. Matlab does...

9 years ago | 0

Answered
Use loop for indexing
Use the auto-indentation to get clear code: for i=1:c index = find(labels == i); if ~isempty(index) ...

9 years ago | 0

Answered
How to set multiple pause() in a for-loop?
The problem must be somewhere else, because the shown code works: figure; axes('NextPlot', 'add'); for i = 1:20 ...

9 years ago | 1

Answered
How to add more variables in script function file....
How did you create this huge and unclear code? Do not create it explicitely, but perform the multiplication dynamically. Stor...

9 years ago | 1

Answered
Operation on 3 dimension matrix
Why do you want to do this without a loop? The main work is spent with tha matrix multiplication. Even a vectorized version cann...

9 years ago | 0

Answered
mex -setup problem ?
XCode is a compiler for MacOS. If you run Windows 10, this message should not appear. As Walter asked already: Did you copy file...

9 years ago | 0

Answered
MATLAB Guide GUI Help - Strange Error in axes() callback - Not enough input arguments
What is the contents of |handles.Overall_Image_axes|? Check this with the debugger. Type this in the command window: dbstop...

9 years ago | 0

Answered
How to plot graph with 1 y-axis and 2 x-axes ?
Searching in the net will let you find this link: <https://www.mathworks.com/help/matlab/creating_plots/graph-with-multiple-x...

9 years ago | 0

| accepted

Answered
Invalid MEX file, the specified module could not be found (MyAppInstaller_mcr)
The AppInstaller requires MSVC runtime libraries as well as the compiled MEX functions. With the compiler of Matlab 2009a I need...

9 years ago | 1

| accepted

Answered
How to NaN selected threshold values of red,green and blue using matlab code
A bolöd guess: mask = Img(:, :, 1) == 60 & ... Img(:, :, 2) == 100 & ... Img(:, :, 3) == 120; Img(c...

9 years ago | 0

Answered
for loop, write to text file, append, sprintf, fprintf
fileID = fopen('textfile.txt', 'a'); for i=1:5 fprintf(fileID, '%f %f %f \n', direction_lights_i); end fclose(fileID...

9 years ago | 3

| accepted

Answered
executing c++ code within matlab
You cannot call a c++ file directly. At first you have to write a so called Mex-wrapper: this is the function "mexFunction", whi...

9 years ago | 0

| accepted

Answered
How do I create a GUI to plot graphs using data stored in .mat file?
What have you tried so far? How should the loading be triggered? Does the user select the MAT file individually or should it...

9 years ago | 0

Answered
How to only grab *.xls files, not *.xlsx or *.xlsm?
This is not the case in the Matlab versions I know: R5.3, 6.5, 2008a, 2009a, 2011b, 2015b, 2016b, under Windows XP and 7 and Lin...

9 years ago | 0

| accepted

Answered
For Loop 'Index Exceeds Matrix Dimensions' in Function
Use the debugger to find the variable, which is indexed out of its range. Type this in the command window: dbstop if error ...

9 years ago | 0

Answered
Find all numeric values right after the NaN values in a column vector
index = isnan(vec); result = vec([false; index(1:end-1)]); Or in one line: result = vec([false; isnan(vec(1:end-1)...

9 years ago | 0

| accepted

Load more