Answered
Apply cell fun specifying a particular condition of the applied function to my cell
"Index exceeds array bounds" seems to be very easy to fix. Find out, which index is concerned. Perhaps Sequence is a cell array,...

8 years ago | 1

Answered
How to decompress a Jpeg compressed data?
I strongly recommend to ask an internet search engine for "Matlab jpeg decompress". You will find many solutions and such a shor...

8 years ago | 0

Answered
Using waiter/progressbar with uipanel
You find some hundreds submissions concerning the indication of a progress in the FileExchange: https://www.mathworks.com/matla...

8 years ago | 0

Answered
How can I get the cell array's max vaule in each cell?
I assume: maxValue = nan(1, numel(d)); maxIndex = nan(1, numel(d)); for k = 1:numel(d) [maxValue(k), maxIndex(k)] = max(...

8 years ago | 0

Answered
Why would circshift stop working.
Use the debugger to find out, what happens: https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.htm...

8 years ago | 0

Answered
How can I save permanently a change made in a GUI?
You can insert a command to load the data in the OpeningFcn: function OpeningFcn(ObjectH, EventData, handles) PrefFile = fullf...

8 years ago | 0

| accepted

Answered
how to filter without a for loop (first order filter)
Your code does not run: What is RPMFilt(i-1) for i=1 ? Please post the real code, which runs and produces the wanted result. Do...

8 years ago | 0

| accepted

Answered
how to make a matrix without hardcode?
function that has two scalar inputs - your function has 3 inputs yet: function[A]=ECE(row,column,q) Omit the useless "q". x ...

8 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals. New to MATLAB please help me out.
With some guessing: a = 1:40; for i = 1:10 pop(i,:) = a(randperm(numel(a),10)) end for i = 1:10 opo_pop(i,:) = 40 - ...

8 years ago | 1

| accepted

Answered
Gui error on the execution process
I guess based on the name of the variable "im", that the software expects a gray image, which is a 2D matrix, but you provide an...

8 years ago | 0

Answered
Matrix size is A(100*100). Weighted average of the 4 elements.
In the original question and the image you mentiones 2x2 submatrices. In the commend you talk of 4x4 submatrices. This is not cl...

8 years ago | 2

| accepted

Answered
Storing a single in a structure is changing the data type
The data type is converted, if the field existed before and was filled with the data: S = struct([]); S.a = []; % Type: dou...

8 years ago | 1

| accepted

Answered
When I run plot it doesn't show my figure
You resample the frequency, which is a scalar value, instead of the signal itself: S1 = resample(fs, 22050, 44100); You mean: ...

8 years ago | 0

Answered
Matlab reboots my computer when running parellel computation
If the mainboard display tells you to check the memory, check the memory exhaustively. I'm using the free version of memtest86 h...

8 years ago | 2

| accepted

Answered
Find max from complex cell
With some guessing: OutMin = cell(size(C)); % I assume C = HeadPipe OutMax = cell(size(C)); for k = 1:numel(C) tmp ...

8 years ago | 0

| accepted

Answered
Little Index Problem in filling a cell array iteratively
Do not use "sum" as name of a variable, because this causes confusion frequently, when you try to use the function sum() afterwa...

8 years ago | 1

Answered
How to generate a a restricted binary number
What exactly is a "number include 24 bits"? This sets 4 elements to 1 and 20 to 0: v = zeros(1, 24); v(randperm(24, 4)) = 1; ...

8 years ago | 0

| accepted

Answered
Matlab suddenly does not start
As usual the readers have less chances than you to find out, what "suddenly" exactly means. Of course something has happend in b...

8 years ago | 2

Answered
please help me to debug the error and scale the image thanks...........I'm working on license plate number recognition usig matlab
Working with relative path names is prone to bugs, because the current directory can be changed unexpectedly. Work with absolute...

8 years ago | 0

Answered
How to change colormaps for different figures in single plot?
You can set the target as first input of the caxis command: FigH(1) = figure; FigH(2) = figure; FigH(3) = figure; caxis(FigH...

8 years ago | 0

| accepted

Answered
Assign vector to 3d matrix
If xhatc is defined before: xhatc(:,1,:) = 1 or maybe: xhatc(1:2,1,1:end) = 1 It will get clear if you post, if xhatc is def...

8 years ago | 0

Answered
How to make MATLAB code run faster
I just moved some repeted calculations out of the loop: h = 16; %hours available K = 15; %Capital z = 1; %Total factor produc...

8 years ago | 1

| accepted

Answered
How can I convert this cell array into time stamps?
t = datetime(.0028356, 'ConvertFrom', 'datenum', 'Format', 'HH:mm:ss')

8 years ago | 1

Answered
How to write a simple but robust loop for the following example?
What have you tried so far? The current information is that the lower limit is 0. Then the result is trivial: There is no limit ...

8 years ago | 0

| accepted

Answered
An iteration Code causing error
The code stops in: X1(i)=200; Sse(i)=5; Snoe(i)=2; t(i)=0; While i is not defined yet, it is the imaginary unit. I guess you ...

8 years ago | 1

Answered
How to write to a fopen text file in a new row without deleting previous text?
What about: file1=fopen(H, 'a'); % Instead of 'w'

8 years ago | 0

Answered
for loop to matrix calculation
1/exp(1) is a very expensive calculation. Do this once before the loop. The index "l" (lowercase L) looks like a "1", so I repl...

8 years ago | 1

| accepted

Answered
How to enter a char vector using Edit Field and For loop in app Design?
You do not need a FOR loop inside a GUI. Simply create the wanted number of edit fields. This is more intuitive.

8 years ago | 0

Answered
Undefined function or variable error
Replace while option == Y by while strcmpi(option, 'y') In your code Y is a function call, not the character, because the ...

8 years ago | 0

| accepted

Answered
Is there any way of executing multiple DOS commands in one run?
Append a '&' to the string provided to dos() (or to system(), which does not depend on the platform): for k = 1:5 filename =...

8 years ago | 1

| accepted

Load more