Answered
How does a line plot handle data larger than the axes size?
This was answered some years ago: https://www.mathworks.com/matlabcentral/answers/252979-increase-the-plotting-performance-in-th...

3 years ago | 1

| accepted

Answered
what is the problem in this convolutional code
There is another problem before: % rate 1/2 convolutional encoder % define trellis trellis = poly2trellis(7,[111 111]); %...

3 years ago | 0

Answered
how to find a line perpendicular to another line?
% 2 points to define a line: X = [126.3798 126.3818]; Y = [37.5517 37.5495]; % Its direction: v = [diff(X); diff(Y)]; n =...

3 years ago | 0

| accepted

Answered
How to normalize stereo audio?
signal = signal ./ max(abs(Signal), [], 1);

3 years ago | 0

Answered
Alternative ways to generate a structure from strings without using eval?
"I want to build an internal structure in a data/string driven way." - This is the design error already. Why did you decide for ...

3 years ago | 1

Answered
Changing the Reading of Files in a For Loop
This is a job for Stephen's https://www.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filename-sort or https://ww...

3 years ago | 0

| accepted

Answered
fopen always open the file even when it is already open
"fopen is supposed to return -1 when it can't open the file" - correct, this is the defined behavior. "So I thought when I had ...

3 years ago | 0

| accepted

Answered
Find duplicate elements and remove the rows that has similar values in one column
Avoid iteratively growing arrays, because they are extremly expensive. See: x = []; for k = 1:1e6 x(k) = rand; end This...

3 years ago | 1

| accepted

Answered
Reading data from a different URL each iteration
F = "https://lgdc.uml.edu/common/DIDBGetValues?ursiCode=JI91J&charName=foF2,foF1,foE,foEs,hmF2,hmF1,hmE" + ... "&DMUF=3000&...

3 years ago | 0

| accepted

Answered
Creating a DFT without built in function
p = 0; for k = 0:1:N-1 p = xn * exp(2*pi*-1i*n*k/N); end This overwrites p N times. Should this be a sum? If xn is a ve...

3 years ago | 0

Answered
remove and replace text in a .dat file
You cannot replace a line in a text file on the disk directly, because the new text might have another number of characters than...

3 years ago | 0

| accepted

Answered
Beginner: How do I loop through strings ?
This is the question asked most frequently by beginners. The answer of the experts is always the same: Don't do this. This is e...

3 years ago | 0

| accepted

Answered
Load different files from folders
Do the .xmp files have the same name as the .csv files? Do all .csv files inside the base folder belong to the measurements? The...

3 years ago | 0

| accepted

Answered
design filter to implement in microcontroller
You find C code implementation of filter() here: https://www.mathworks.com/matlabcentral/fileexchange/32261-filterm As M code: ...

3 years ago | 0

Answered
Convert cell to matrix
C = {'00000000', '00000010', '00000011'}; D = cat(1, C{:}); % Convert to matrix of type CHAR E = D - '0' % Convert to ...

3 years ago | 0

| accepted

Answered
Writing commands in MATLAB
No, this will not work. Since R2009a Matlab is case-sensitive even under Windows. You cannot call sin() using the name SIN(). B...

3 years ago | 1

Answered
sprintf into a number
Stephen an Walter hit the point. % Store imported data in an array instead of polluting the workspace: FileData = load('YourIn...

3 years ago | 0

| accepted

Answered
How can I rotate a 3d figure with the rotation matrix without using functions?
In a matrix multiplication the length of the row of the first matrix must equal the length of the column of the second one. In ...

3 years ago | 0

| accepted

Answered
for loop to sum values
what about the answer given to your similar question: https://www.mathworks.com/matlabcentral/answers/1826808-sum-of-values-in-m...

3 years ago | 0

Answered
sum of values in matrix with a loop
outDates = rand(52560, 8); % Arbitrary test data X = reshape(outDates(:, 6:8), 144, [], 3); Y = squeeze(sum(X, 2) / size(X, 2...

3 years ago | 0

Answered
How do I save image in folder using imrite and how do I show all the image in folder?
Maybe you want to create the file name dynamically: ... outFile = fullfile(path_directory, sprintf('fcmgrayb245_73_864_rap%05d...

3 years ago | 0

Answered
How do I create a for loop for the this example?
The solution is easy, if you do not hide the index in the name of the variable as in i_end_cd1, i_end_cd2, ... Use a vector inst...

3 years ago | 0

| accepted

Answered
I get Arrays have incompatible sizes for this operation with an elseif statement what do i do?
The == operator compare the arrays elementwise. Therefore the arrays on the left and right must have the same number of characte...

3 years ago | 0

| accepted

Answered
How to assign a value to a variable in for loop?
This is the most frequently asked question from beginners. Professional programmers give the simple and not expected answer: Don...

3 years ago | 0

| accepted

Answered
How to save all the images generated from the for loop?
Remove the line f=figure; at the bottom of the loop, but open a new figure on top: for i=1:length(fileList) FigH = =figu...

3 years ago | 0

| accepted

Answered
Proper if/else statement in appdesigner
Ref = app.rr_camber_ref.Value; Value = app.rr_camber.Value; if abs(Value - Ref) / abs(Ref) < 0.05 app.Lamp_rr_camber.Co...

3 years ago | 1

| accepted

Answered
How do I change the font type in the axes?
Ax1H = subplot(1,2,1); Ax1H.FontName = 'Serif'; Ax1H.FontSize = 15; Ax2H = subplot(1,2,2); Ax2H.FontName = 'SansSerif'; Ax2...

3 years ago | 0

Answered
Match two columns with names/strings that are not 100% identical
Pool = {'NAME123ABC', 'NAME2XYZ', 'NAME3333', 'NAME ZZZ'} Data = {'XYZ', 'Name1ABC', 'abc', '123A', 'AAA', 'ABC ABC', 'Name1 AB...

3 years ago | 0

Answered
Matlab takes long time to start, also it lags so much and windows task manager shows very high memory usage. How to fix this?
Do you really need all toolboxes? This is a massive overkill. You can run the installer again and deselect the toolboxes, you d...

3 years ago | 1

Answered
Processing each data automatically in a loop
If you do not want to call uigetfile, remove this command: pathname = 'C:\Your\Folder'; for i = 0:287 filename = fullfile...

3 years ago | 0

| accepted

Load more