Beantwortet
Click button uifigure callback function
This looks strange. I do not see the reason for the error. Is this really the complete error message? Use the debugger to check...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
GUI app callback functions problem
I'm not sure if I understand, where in the code the problem occurs. Waiting for a figure to be closed is done by the waitfor fun...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Find the desired row in the matrix
While removing multiple rows is easy using the unique(x, 'rows'), I did not find a built-in functions to identify the vectors, w...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
sort each row of a vector according to its value
You do not need a function, because this is staight indexing: a = [1 3 10 5]'; b(a) = a b must be undefined or empty before t...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Solve the ODE using ODE45 and plot the response for the initial conditions
If you call a function "ode45", it depends on where its folder is located in Matlab's path, if it is used or the original ODE45 ...

fast 4 Jahre vor | 0

Beantwortet
Please ask the code
You overwrite the value of m multiple times: m=3; m=0.1; m = linspace(0,0.001); Because projfun is a nested function, it use...

fast 4 Jahre vor | 0

Beantwortet
Ignore rows in cell with no delimiters
You want the output: B = {a1} {1} {a2} {2} {a3} {3} {a4} {a5} {a6} {6} This is not possible. A cell matrix is still a m...

fast 4 Jahre vor | 0

Beantwortet
How to create for and if loops instead of while
WHILE and FOR loops are equivalent: k = 1; while k <= 100 ... k = k + 1; end and for k = 1:100 ... end

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
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]); %...

fast 4 Jahre vor | 0

Beantwortet
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 =...

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 0

Beantwortet
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 ...

fast 4 Jahre vor | 1

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
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&...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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: ...

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 1

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

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Mehr laden