Answered
English as default Mathworks language
On the bottom of the page, there is a "button" to select the language: A rectangle with rounded corners and the current language...

8 years ago | 3

| accepted

Answered
Trying to do polynomial interpolation but I get a matrix full of zeros (almost)
Why do you assume, that the matrix A contains zeros? It does not: x = [150, 200, 300, 500, 1000, 2000, 99999]'; y = [2, 3, 4, ...

8 years ago | 0

| accepted

Answered
how to write a program to round numbers
Rounding is the same as adding 0.5 and cropping the fractional part of the number. For negative numbers you have to subtract 0....

8 years ago | 0

Answered
add image to gui
If you want to fill the complete screen with an image, you can use this under Windows: FileExchange: WindowAPI : FigH = figure...

8 years ago | 0

Answered
Saving a figure as a png with a specific name from predefined variable
With some guessing: saveas(gcf, [plottitle, '.bmp'])

8 years ago | 0

| accepted

Answered
How to delete elements from structure
If you want to delete a field, use rmfield: cell.population = rmfield(cell.population, 'type') Of course, this removes the fie...

8 years ago | 3

Answered
Can xlswrite be used to append information
You can import the data from te existing Excel file, determine the size, and insert the new data at the required location. You f...

8 years ago | 1

| accepted

Answered
How can I speed up "writetable" for large tables?
According to https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 : ...

8 years ago | 0

Answered
dlmwrite gives error message Too many output arguments.
Use the debugger. It is the best friend of the programmer. dlmwrite stops in line 104. This is the error handling part of a TRY...

8 years ago | 2

| accepted

Answered
How to display data from editext in listbox in GUI ?
UNTESTED!!! function yourGUI StrList = {'a', 'an', 'able', 'back', 'car', 'create'}; H.Fig = figure('Position', [100, 100, ...

8 years ago | 1

Answered
Index exceeds the number of array elements .Please help??
x = linspace(0,10000) This creates 100 elements netwee 0 and 10000. Then x(k) will fail at k=101. The debugger allows for find...

8 years ago | 0

Answered
How can i creat subvectors ?
With File Exchange: RunLength : a = [1 2 5 NaN NaN 9 0 23 12 NaN 6 2 8]; [B, N, Ind] = RunLength(isnan(a)); match = (~B); N...

8 years ago | 0

Answered
Timer object is only executing part of the timerfcn on second and later iterations.
If you use function instead of anonymous functions, you can use the debugger easily to see, what's going on. t.TimerFcn = {@my...

8 years ago | 0

Answered
MATLAB 2017a unable to detect MS Visual C++ 2017 compiler
Look at the list of supported compilers: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files...

8 years ago | 0

Answered
Repeat all operations for n rows inside an array (with n unknown)
M = [0.3 0.4 4; ... 0.5 0.6 3.1]; nRow = size(M, 1); for iRow = 1:nRow yourOperation(M(iRopw, :)) ... end I...

8 years ago | 1

| accepted

Answered
Insert smaller matrix into larger matrix with an equal number of columns.
X = 10; Y = 35; The problem is that X:Y has 26 elements, not 25. Remember: If A has 1 row only, you will not use: 10:11 but 10...

8 years ago | 0

| accepted

Answered
How to convert decimal into binary?
This code shows '11111111' only, because you overwrite the output in each iteration: n= 8; for i = 0:2^n-1 x = dec2bin(i,8...

8 years ago | 0

| accepted

Answered
Axes Click in GUI interrupts Figure Plot
imshow(frame); shows the image in the current axes. If you click on an axes, e.g. handles.graph1, you make it active. Then ...

8 years ago | 0

Answered
How do I delete a row in a table containing certain text?
You are almost there. isequal(indices.CalendarYear, 'Total:') This tests, if indices.CalenderYear is equal to the char vector ...

8 years ago | 2

| accepted

Answered
Splitting Cell Arrays into smaller ones of specific length
The question is not clear. Which class and type should "values 1:6" be? Do not hide indices in the name of variables. The dynam...

8 years ago | 1

| accepted

Answered
Concatenate a file path in copyfile
Do not use cd to affect the current directory. Remember that a callback of a GUI or timer can change the current folder unexpect...

8 years ago | 0

| accepted

Answered
Do we have an efficient way to do this matrix multiplication?
Matlab calls optimized functions for sparse matrix multiplications already. Sometime we had an acceleration with hard-coded spar...

8 years ago | 2

| accepted

Answered
How to fill in missing rows in a Matrix
% Create the full array manually: v = (0:0.02:1.5).'; k = [0.5, 0.45].'; % I cannot guess which values you have here M(:, 2:...

8 years ago | 0

| accepted

Answered
How do i Use a filename that was loaded in a function to label the Legend of my figure ?
Callbacks do not reply outputs. The output "filename" of the function addplot() is sent into the nirvana. You cannot expect that...

8 years ago | 1

Answered
Vectorization of matrices multiplication
h = dot(PointsA - PointsB, normals).' or h = sum((PointsA - PointsB) .* normals, 1).'

8 years ago | 3

| accepted

Answered
i have a double array and i want to convert that to an image but when i am doing so all the pixel values is getting converted to 255
Maybe all you have to do is to normalize the array: % Normalize the range [0, a] to [0, 1] img = X / max(X(:)); If the origin...

8 years ago | 0

Answered
How do I continuously read the mouse position as the mouse is moving only on axes on a figure
See https://blogs.mathworks.com/videos/2008/05/27/advanced-matlab-capture-mouse-movement/ Use the 'WindowButtonMotionFcn' and d...

8 years ago | 1

| accepted

Answered
ISMEMBER() modified result desired
Do you mean something like this: function [lia, locb] = ismemberNext(A, B) lia = false(size(A)); locb = zeros(size(A)); for...

8 years ago | 1

Answered
Warning while overwriting a workspace variable?
A method for such warning would cause a tremendous trouble. See this script: % Script called from base workspace: a = 0; for ...

8 years ago | 2

Load more