Answered
Rename files with same name as parent folder
Do the folders "Folder A", "Folder B", ... have the same parent folder? Is there a pattern to recognize "File 1"? The simplifica...

5 years ago | 0

| accepted

Answered
How can I optimize this recursive for loop?
tic Tmax = 1e2;% which I want to increase by 1 order of magnitude dt = 1e-2;% which I want to decrease by 1 order of magnitude...

5 years ago | 0

| accepted

Answered
How can I fix this? Warning: Data clipped when writing file. > In audiowrite>clipInputData (line 407) In audiowrite (line 187) In generator (line 100)
You can normalize the data such, that the values are in th allowed range [-1 +1]: dtmf_output = dtmf_output ./ max(abs(dtmf_out...

5 years ago | 0

Answered
Loading files with different names in MatLab
Do you want to load all files inside a folder? Folder = 'C:/Users/M/Datasets'; FileList = dir(fullfile(Folder, '*.vhdr')); ...

5 years ago | 0

Answered
Issue in using p file
You cannot use an outdated P-file in a modern Matlab version. Either download an old Matlab version and run the code there. Or ...

5 years ago | 1

Answered
ContextMenu for each ListBoxItem
For the Java based listboxes in figures (not uifigures), see: https://undocumentedmatlab.com/articles/setting-listbox-mouse-acti...

5 years ago | 0

Answered
How to calculate the result correctly?
You show us a formula, which calculates a negative value and explain, that the result should be positive. The argument, that a s...

5 years ago | 0

Answered
How to add values to matrix in a loop given an extra condition.
A = [1 -2; ... 3 3; ... 4 -5 ]; A2 = zeros(size(A, 1), 1); % Pre-allocate maximum number of elements iA2 =...

5 years ago | 0

| accepted

Answered
Appending of matrix columns
This is a basic question. In is more efficient to learn the fundamental basics from Matlab's Onramp or from the Getting Started ...

5 years ago | 0

Answered
Is it possible to vectorize this simple recursive function in loop?
No, this cannot be vectorized. The idea of vectorization is that the same function is applied to many arguments independently f...

5 years ago | 1

| accepted

Answered
facing issue to show images from folder.
Use the debugger to find the cause of errors. Type this in the command window: dbstop if error Then run the code again. When M...

5 years ago | 0

Answered
How do I put arrays into a for loop
Hiding an index in the name of a set of variables is the main problem here. This makes it hard to access the variables. Use an i...

5 years ago | 1

Answered
How to transpose cell arrays within a larger cell array
"The dynamics file is a {1x3} cell and embedded within this are another set of {3x1} cells with uniform matrices." - What are "u...

5 years ago | 0

| accepted

Answered
How to stop execution of a program through code?
tic; while toc < 120 figure; axes; plot(1:1000, rand(1, 1000)); pause(0.5); delete(gcf); end Or equ...

5 years ago | 1

| accepted

Answered
Error using reshape (Size arguments must be real integers)
This is not meaningful: V_final=[101010100010000010001000000000] Do you mean this: V_final=[1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,1...

5 years ago | 0

| accepted

Answered
Problems with reading a .txt file in Matlab
The format of the text file is not trivial. Some headers and data sections occur and without having the exact definition it is n...

5 years ago | 0

Answered
java heap error when opening txt file
"I think 820MB shouldn't be too large" What is the purpose to open a 820MB file in Matlab's editor? What do you want to do with...

5 years ago | 0

| accepted

Answered
How can I make a table bisection method and put all iterables step by step?
With your current method the table is overwritten in each iteration. Create the table before the loop and insert the new values ...

5 years ago | 0

| accepted

Answered
How to resolve this below error
The error message tells all known details already. COM4 is not available. Other ports are not availaible also. Matlab suggests t...

5 years ago | 1

Answered
cant open .fig anymore
Use the debugger to find the reason of the problem. Type this in the command window: dbstop if error Then run the code again. ...

5 years ago | 1

| accepted

Answered
find and plot in a x-y graph the pixels allong the red line
See: doc improfile

5 years ago | 1

| accepted

Answered
Question over pseudo algorithm
y0(f_i+1) = y_end(f_i): y0 = y(end, :)

5 years ago | 0

| accepted

Answered
How to format an array so all numbers are the same length
data = repmat([0.01, 0.1, 1, 10, 1000], 2, 1); fprintf(' |%8.6g| %-8.2f |\n', data)

5 years ago | 0

Answered
Could you solve the integral error?
The error message explains the cause and suggests a solution already. You do not post any other information. Then it is impossib...

5 years ago | 0

Answered
Breaking up a long line of plot code
The marker for the line continuation in Matlab is "..." : figure plot(Dates, PW_4anom, ' bd', ... 'MarkerEdgeColor', 'k',...

5 years ago | 0

| accepted

Answered
How to store values from a for loop in an array/matrix?
img = randi([0,1], 10, 10, 3) * 255; imgIsRead = (img(:, :, 3) == 255); [v1, index1] = max(sum(imgIsRed, 1)) [v2, index2] =...

5 years ago | 1

| accepted

Answered
Accessing order pair from sparse matrix
Do you want to get the indices of the non-zero elements? [i,j,s] = find(S); The is taken from help sparse

5 years ago | 0

| accepted

Answered
Using find function in Matlab to find data at specific time
index = find(Data >= 0, 1, 'first'); N = Data(index:end)

5 years ago | 1

Answered
Array row is not added in for loop
What is the purpose of syms L W H; Why do you want to solve this symbolically? As soon as you omit this line, the code works f...

5 years ago | 1

| accepted

Answered
How can I load multiple txt files sequentially?
A bold guess: %0.5g is not the matching format. Try this: tite = sprintf('Experiment_%0.5g/Shot%0.5g/HRD12561__%d__*.txt', shot...

5 years ago | 0

Load more