Respondida
Plotting and finding the intersection of 2 curves
If you have two vectors, x1, y1 that form the curve (x1, y1), and likewise, another curve (x2, y2), then you can get the interse...

casi 2 años hace | 0

Respondida
Is it possible to have two indices in a for loop?
>> Is it possible to have 2 indices in the same for loop? (i and k). In your i- and k-loops, you are considering every combinat...

casi 2 años hace | 0

Respondida
Is it possible to have two indices in a for loop?
Jan's solution appears to not provide all combinations of (i,k) for the 2D array, AEMGstructHR. So I do not see how that constru...

casi 2 años hace | 0

Respondida
Frequency and Phase response of an IIR system whose system function is given H(z)
Here is an example to plot the magnitude and phase frequency response >> b = [0.0563 -0.0009 -0.0009 0.0563]; >> a = [1...

casi 2 años hace | 0

Respondida
Solving probability problems with MATLAB
You can simulate this problem using a Monte Carlo Simluation. https://www.mathworks.com/matlabcentral/answers/97605-are-there-a...

casi 2 años hace | 0

Respondida
How to make the estimation error and average it correctly?
for sd = 0:10:50 PN=Po+(sd.*gaussnoise); end In each iteration of this inner loop, PN is computed with a new ...

casi 2 años hace | 0

| aceptada

Respondida
Is there a way to access a struct object's reference (handle) in MATLAB?
This may be close to what you are looking for. Define a classA.m classdef classA < handle properties a end me...

casi 2 años hace | 0

| aceptada

Respondida
Removing one of two plots on a single axis
t =0:.01:1; y = sin(2*pi*4*t); hold on; h1 =plot(.2,.5,'ro'); pause delete(h1) Hit a spacebar and the red circle will disap...

casi 2 años hace | 0

Respondida
Compare Matrices within tolerance range
For a tolerance match between corresponding elements of the rows, start off with this: a = a(:); b = b(:); %% Check for equi...

casi 2 años hace | 0

Respondida
How to resolve Matrix dimensions error?
I made the code more readable to me, and adjusted the dimensions which are in the annotations. % Increment of current I=0:0.5:...

casi 2 años hace | 0

| aceptada

Respondida
How to resolve Matrix dimensions error?
y = polyval(I,x); % Error Did you mean y = polyval(x,I);

casi 2 años hace | 0

Respondida
How to resolve Matrix dimensions error?
E =(Po-y).^2; % ( 1x21 - 1x3 ) .^ 2 is this what you want: E =(Po-y').^2; % ( 1x21 -3x1 ) .^ 2

casi 2 años hace | 0

Respondida
subtraction of each row with every other row
B = repmat(A, N,1) - repelem(A,N,1);

casi 2 años hace | 1

Respondida
How can we convert programs made on older version to be available on newer version of MATLAB?
I had problems with Excel in general when a Windows upgrade to Windows Defender occured. Defender started marking certain folder...

casi 2 años hace | 0

Respondida
subtraction of each row with every other row
A=[1,2,3,4,5; 6,7,8,9,10; 11, 12, 13, 14, 15;16, 17, 18, 19, 20]; c = nchoosek(1:size(A, 1),2); c2 = [c; fliplr(c)]; B = ze...

casi 2 años hace | 0

Respondida
Which is more efficient for iterative programs: while loops or terminating with an if statement and break command?
for the "%if statement with break": Suppose someArray has a million elements in it. If, in the 10th iteration, criteria(i)==1, ...

casi 2 años hace | 0

Pregunta


How to remove for-loop in computing a vector of sums?
How to compute rcross vector without the for-loop? rcross = zeros( length(elementProduct) - prefixLen , 1 ); for ii = 1:...

casi 2 años hace | 0 respuestas | 0

0

respuestas

Respondida
Why do we transfer the image into double?
MATLAB when using mixed mode arithmetic, will try to save memory. 250 + 10 = 260, right? >> x =double(250) + uint8(10); >> x ...

casi 2 años hace | 1

Respondida
How to write multiple image from a for loop to a dir
I copied your method of writing the images to files and there were no problems. Irgb = imread('Lena.jpg'); J = Irgb...

casi 2 años hace | 0

Respondida
I want to loop reading in several images. and then perform analysis on those images.
sumImage = OriginalImage + SecondImage + ThirdImage + FourthImage + FifthImage + SixthImage + SeventhImage + Image8 + Image9; Y...

casi 2 años hace | 0

Respondida
Not enough input arguments
Cannot speak to your simulink model, but the MATLAB code below runs without error. time = 1:1/100:1000; theta = -pi/2:pi/(max(...

casi 2 años hace | 0

Respondida
In "Analyzing Cyclical Data with FFT" example, how the frequency was calculated?
If n is even, the following is equivalent to your code: f = linspace(2/n, 1, n/2) * maxfreq;

casi 2 años hace | 0

| aceptada

Respondida
How to Cut multiple files from multiple folders in a for loop? Then return them to their own folders containing those cuts.
You can recursively find all files with a .wav extension using code from here: https://www.mathworks.com/matlabcentral/fileexch...

casi 2 años hace | 0

| aceptada

Respondida
How can I fix the error?
Sometimes a simple transpose will solve the problem. Use size() and transpose accordingly.

casi 2 años hace | 0

Respondida
how to i check if matrix cotaining logical 1
One simple way: if sum(B) > 0

casi 2 años hace | 0

Respondida
biterr Error on 3D Matrix
Maybe I am not looking hard enough. >> the inputs must be either a vector or a matrix with mxn dimensions Only thing I saw in ...

alrededor de 2 años hace | 0

Respondida
How to generate two independent white noise
An easy way to think about the mean over a sample not being what you expected is to consider a fair coin having a head (H, give ...

alrededor de 2 años hace | 0

Respondida
Why is my code running so slowly in the while loop?
>>> while currentcycle > 1 currentcycle is not changing within the while-loop. You need to modify the value of currentcycle ...

alrededor de 2 años hace | 0

| aceptada

Respondida
Short time energy, st zero crossing etc.
See if this can help you with what you have already done. https://www.mathworks.com/matlabcentral/fileexchange/23571-short-time...

alrededor de 2 años hace | 0

Pregunta


biterr Error on 3D Matrix
B = [1 2 3; 4 5 6; 7 8 9]; size(B) % ans = 3 3 biterr(B,B) % ans = 0 Why does biterr work here, but not below? A =...

alrededor de 2 años hace | 2 respuestas | 0

2

respuestas

Cargar más