Domanda


How to replace the values of a vector from desired location to its end?
I have three vectors a, b and c given below. I want to replace all the values of 'a' from my desired location say for example fr...

circa un anno fa | 2 risposte | 0

2

risposte

Domanda


How to arrange a matrix in descending order w.r.t rows?
If we have a large matrix and we want to arrange it in descending order i.e., the largest row shoud come on top, then 2nd larges...

circa un anno fa | 2 risposte | 0

2

risposte

Domanda


How to find the vector b if we know the RMSE?
If we have two vectors given by: a=[3,6,8,20,35,45]; b=[3.0343, 6.2725, 8.5846, 18.3781, 34.2025, 44.9699]; Then its Mean Squ...

circa un anno fa | 2 risposte | 0

2

risposte

Domanda


How to replace all for-loops ?
I had posted a function here for vectorization. Now this is the same function and even I tried myself to replace all for-loops l...

circa un anno fa | 1 risposta | 0

1

risposta

Domanda


How to recover Mat data?
I had saved my worksapce data with the name 'abc'. This had many variables some of which were scalars and some of which were vec...

circa un anno fa | 1 risposta | 0

1

risposta

Domanda


I don't understand why does it give error?
I downloaded the following code from Mathworks site whose URL is : URL: https://www.mathworks.com/matlabcentral/fileexchange/52...

circa un anno fa | 1 risposta | 0

1

risposta

Domanda


How to vectorize this piece of code by replacing all the for-loops?
I want to vectorize the following piece of code so that it becomes fast. But M and N can be only coprime numbers and N < M alway...

circa un anno fa | 2 risposte | 0

2

risposte

Domanda


How to reduce its execution time and why the value of e is a column vector?
I have the following piece of code. clc;clear all; c = 340; f = 3400; d = c/f/2; T = 1; ...

circa un anno fa | 2 risposte | 0

2

risposte

Domanda


how to reduce its computing time?
u=[30 40 50 70]; b=u; [~,C]=size(b); P=C/2; M=10; xo=zeros(1,M); yo=zeros(1,M); zo=zeros(1,M); for k=1:M for i=1:...

circa un anno fa | 1 risposta | 0

1

risposta

Domanda


Why does it give wrong answer?
I took a code from the Mathworks site given below: URL: https://www.mathworks.com/help/phased/ref/rootmusicdoa.html N = 10; d...

circa un anno fa | 0 risposte | 0

0

risposte

Domanda


Why this code gives error on line 47?
I downloaded the code attached from the following URL of Mathworks site: URL: https://www.mathworks.com/matlabcentral/fileexcha...

circa un anno fa | 1 risposta | 0

1

risposta

Domanda


How to reduce its execution time?
I have the following piece of code. It works but takes time. How can we reduce its time to a very minimum value? u=[1 3 5 7 20 ...

oltre un anno fa | 2 risposte | 0

2

risposte

Domanda


Same code but different results-very strange?
I asked a question on December 10, 2022 on this forum. The URL of the question is: https://www.mathworks.com/matlabcentral/answ...

oltre un anno fa | 0 risposte | 0

0

risposte

Domanda


How to invoke and use GA tool in Matlab R2022b?
I typed optimtool in Matlab R2022b to invoke the GA Tool but its' not there. Can anybody guide me how to invoke and use GA tool ...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


How to copy data of one or more variables from one Mat file to another Math file?
I have two Mat files namely 2sn20 and 2sn20Vectorized. They have data of different variables. Some of them are scalars and some ...

oltre un anno fa | 2 risposte | 0

2

risposte

Domanda


How to vectorize this piece of code and why doesn't e come out to be zero though it must come out to be zero because u and b are equal?
u=[30 50 75 -30 -50 -75]; b=u; Noise=5; M = 6;%Constant1 N = 6;%Constant2 d = 0.5;%Constant3 K = length(u)/2; %Cons...

oltre un anno fa | 2 risposte | 0

2

risposte

Domanda


Why this gives error?
I downloaded the attached codes " hPSO1.m", and "hPSOoptions.m" and tried to run it with my fitness function"myfitness.m" (also...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


Vector form of for loop?
I have a piece of code that works fine. But it has a for loop as below: M=5; N=10; abc=0.0; for m1=1:M*N abc=abc+(abs(yo(...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


All is correct but this code gives error?
I downloaded a file from the Mathworks file exchange and tried to run it, but it was giving error. Then I commented the function...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


Why does histogram gives issues? I rephrased my question
I have the following set of data: fitness1=rand(100,1)*1e-7; fitness2=rand(100,1)*1e-5; fitness3=rand(100,1)*1e-3; Each set ...

oltre un anno fa | 2 risposte | 0

2

risposte

Domanda


How to reduce the size of legend in a fig file?
I have a MATLAB figure "abc.fig". The size of the legend is very large and has covered the graphs. I want to reduce its size and...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


Can we convert a jpg or png image into a fig file via Matlab?
If we have a *.jpg or *.png image and we want to convert it to *.fig image using MATLAB code, how will we do it?

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


How to draw CRLB (Cramer Rao Lower Bound) for RMSE vs Noise?
I have the following estimation of RMSE for Noise varying from 10 to 40. How to draw its CRLB graph? RMSE=[0.1252 0.0914 ...

oltre un anno fa | 0 risposte | 0

0

risposte

Domanda


Why this piece of code gives error?
The following piece of code gives error: Positions=rand(30,3); fobj=@fun4sn0; for i=1:size(Positions,1) Fit(i) = fobj(Po...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


How to extract coordinate values from a graph in Matlab
I have a graph in a png picture and I want to extract the coordinates from this graph and then I want to draw it by my self in M...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


I want arrays of one and two but this code doesn't do it
its deleted

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


MSE and RMSE of vector and Matrix
I have a vector u=[-30 0 41.721]; and a matrix two=rand(100,3); I want to find the error between the two, square of that error, ...

oltre un anno fa | 1 risposta | 0

1

risposta

Domanda


How to remove the AWGN noise from data?
Let's say we have a vector data Uo=[20 30 40 50]; If we add AWGN noise to it, it becomes data U i.e., U=awgn(Uo,30); Now we s...

oltre un anno fa | 2 risposte | 0

2

risposte

Risposto
How to code for the following coordinates?
I did it myself. So if any body needs it, here it is: clear all clc N=11;%9;%7; d=0.5; r=zeros(N,3); x=[0 d:d:(N-1)/2*d ze...

oltre un anno fa | 0

| accettato

Domanda


How to code for the following coordinates?
Let N denotes no. of antennas placed along an axis.Now if I have total 7 antennas i.e., N=7 and I place each antenna 0.5 apart o...

oltre un anno fa | 2 risposte | 0

2

risposte

Carica altro