Answered
how to get the content of cell array
What do you want exactly? |val{k}| contains the contents of the first cell. It does not matter, if you copy the cell |dataBig2| ...

9 years ago | 0

Answered
If statement in a loop
With some guessing: co = 1; F_l = zeros(length(reale), na - 2); % Pre-allocate!!! for c = 1:na-2 co = co + 1; ...

9 years ago | 0

Answered
Reading text files in Matlab with inconsistent whitespace and character array lengths
Data = fileread('dummy_example.txt'); DataC = strsplit(Data, '\n'); DataC(cellfun('isempty', DataC)) = []; nLine ...

9 years ago | 0

| accepted

Answered
How can I solve this problem using Gauss Elimination method in Matlab with codes?
Based on the actual question, I would post this answer: x = A \ b But this sounds like a homework problem. Therefore I w...

9 years ago | 0

Answered
I am writing a code on mimimising hourly load using mixed integer linear programming. Error returned is that number of cols in Aeq must equal number of elements in f, but actually they are both equal to 168. Kindly explain why this error?
Although you assume that the sizes of the arrays are matching, they do not match. You can use the debugger to find out wh. Type ...

9 years ago | 1

| accepted

Answered
How do I find the location of the closest point in a mesh?
Do you mean: [GCP1xmin, Index] = min(abs(GCP1xdiff(ind,:))) ? But what is "ind"?

9 years ago | 0

Answered
How to request for user input for the following code? How do I modify the matlab code below to prompt user to choose images from folder for InputImage and OutputImage?
[InFile, InPath] = uigetfile('*.jpg', 'Import image file:'); if ~ischar(InFile) disp('User aborted file import'); ...

9 years ago | 0

Answered
Not enough input arguments in rgb2gray function
Your function |projectIC| requires 2 inputs according to the definition: function projectIC(I1, angle) Then you have to ...

9 years ago | 0

| accepted

Answered
How to calculate index of minimum value in cell array
See <https://www.mathworks.com/matlabcentral/fileexchange/30963-minmaxelem FEX: MinMaxElem> [MinValue, MaxValue, MinIndex, ...

9 years ago | 0

Answered
Hi! i hope you can help me.
In the callback of the button you have the handle of the axes object, e.g.: handles.axes1 % Adjust according to your GUI ...

9 years ago | 1

Answered
How can i manipulate matrix like this?
If there is a small number of possible repleacements only -perhaps 10-, use |strrep|: toRep = [5 6 6 1]; Rep = [4 3 2 ...

9 years ago | 0

| accepted

Answered
Deploying Matlab for 32Bit Machines is No Longer Supported
Correct. This is known since TMW explained with R2015b, that this is the last 32 bit version. I support some 32 bit systems a...

9 years ago | 0

Answered
How to suppress warnings from fsolve method?
The message means, that the default choise of the Trust-region-dogleg method is not suffcient. The best way to suppress a war...

9 years ago | 0

Answered
Error using wavread (line 67)
The error message is clear: The WAV files has no format, which is recognized by Matlab. Then try to open the file with another s...

9 years ago | 0

Answered
Does MATLAB support parallel pipeline computation in one computer?
What about running three complete pipelines in parallel? Then 3 workers perform all steps. This seems to be easy to implement an...

9 years ago | 0

Answered
Chose vectors (from a randomly generated vectors) which does not contain more than two identical elements
v = [randperm(400, 25), randperm(400, 25)]; v = v(randperm(50, 50)); Now v contains 50 random values from 1 to 400 and n...

9 years ago | 0

Answered
Type "@" in UI edit field without closing Matlab on a German keyboard
Confirmed: R2016b Win7/64 is closed, when you hit AltGr-Q to get an @ character in an edit-uicontrol. uicontrol('Style', 'e...

9 years ago | 0

Answered
Permutation of an array
Start with: A = [1 2 3 4]; M = perms(A); Then pick your submatrix randomly: P = M(randperm(24, 4), :)

9 years ago | 1

Answered
Riemann sum multiple dimensions
The question does not concern the implementation in Matlab, but the mathematical problem. See <https://en.wikipedia.org/wiki/N-s...

9 years ago | 1

Answered
Matlab corrupts excel file after/during read
Try to open the file in Excel. Does this work? If not, it looks like the file is corrupted. Restore it from your backup. Create ...

9 years ago | 0

Answered
Alternate code for dragging a rectangle in R2010a Matlab
Perhaps <https://www.mathworks.com/matlabcentral/fileexchange/23304-moveit2-move-a-graphical-object-with-the-mouse> helps.

9 years ago | 1

| accepted

Answered
Matrix basic operation error
In modern (>= 2016b) Matlab versions use: A = [1 1 1; ... 2 2 2; ... 3 3 3]; m =...

9 years ago | 1

Answered
how do I get my activation key?
Please take the time to search in the net or in this forum. You will find immediately e.g.: * <https://www.mathworks.com/matl...

9 years ago | 0

Answered
In a for loop, how do I combine rows when values are equal?
for k = 1:length(A)-1 if A(i) == A(i+1) % A(i) = mean(A(i:i+1)); % Omit this! The mean of two equal value is the ...

9 years ago | 0

| accepted

Answered
from mat to csv
Think twice. It is not possible - except if you clarify any details: How should the resulting file look like? There is no unique...

9 years ago | 0

Answered
How to plot a line in a GUI that updates with a button press
It seems like you draw repeatedly lines consisting of 1 point only and this might be hard to see. But if you want a line, you ha...

9 years ago | 1

Answered
Stuck in subplot mode, how do I reset the plotting engine?
Let me repeat: You start Matlab and create a diagram by AxesH = axes() Now the position of the axes is the same as if y...

9 years ago | 0

Answered
How to make matlab remember the last path that a figure was saved in, such that it openes the same path the next time figures are saved?
This does not work for the standard "save" menu entry, but of course you can create such a function by your own. Add your own me...

9 years ago | 0

Answered
Export cell or structures to a file
There is no standard way to export a cell or struct to Excel. It depends on the data structure in Matlab and on how exactly the ...

9 years ago | 0

Answered
how should i obtain hex code for every pixel of the image? please let me know. Its important.
Hex codes can be obtained by the |dec2hex| command or faster by |sprintf('%.2x')|. But for averaging hex codes are not useful. I...

9 years ago | 0

Load more