Month: June 2024
Extracting signal phase using MAximum Entropy Method
Dear community,
I have measured the SFG signal as a function of IR frequency (SFG intensity vs Frequency) and saved it in the file "Rehl.txt". The obtained phase for this signal is saved in another file named "MEM_Phi.txt". I am now using the Maximum Entropy Method (MEM) to extract the phase of the SFG signal.
I have written a code in the file "MEM_Phase.m", but the problem is that the calculated MEM phase is different from the actual phase provided in "MEM_Phi.txt". I would greatly appreciate any help in resolving this issue.
I have also attached a paper that contains the relevant equations. In equation 14 of the paper, P(v) represents the SFG intensity that we have already measured. The unknowns in equation 14 are the values of "beta" and "a_k". By obtaining the values of "a_k", we can calculate the denominator of equation 14, which is a complex value. The MEM phase will then be the phase of these complex values.
Thank you for your assistance.Dear community,
I have measured the SFG signal as a function of IR frequency (SFG intensity vs Frequency) and saved it in the file "Rehl.txt". The obtained phase for this signal is saved in another file named "MEM_Phi.txt". I am now using the Maximum Entropy Method (MEM) to extract the phase of the SFG signal.
I have written a code in the file "MEM_Phase.m", but the problem is that the calculated MEM phase is different from the actual phase provided in "MEM_Phi.txt". I would greatly appreciate any help in resolving this issue.
I have also attached a paper that contains the relevant equations. In equation 14 of the paper, P(v) represents the SFG intensity that we have already measured. The unknowns in equation 14 are the values of "beta" and "a_k". By obtaining the values of "a_k", we can calculate the denominator of equation 14, which is a complex value. The MEM phase will then be the phase of these complex values.
Thank you for your assistance. Dear community,
I have measured the SFG signal as a function of IR frequency (SFG intensity vs Frequency) and saved it in the file "Rehl.txt". The obtained phase for this signal is saved in another file named "MEM_Phi.txt". I am now using the Maximum Entropy Method (MEM) to extract the phase of the SFG signal.
I have written a code in the file "MEM_Phase.m", but the problem is that the calculated MEM phase is different from the actual phase provided in "MEM_Phi.txt". I would greatly appreciate any help in resolving this issue.
I have also attached a paper that contains the relevant equations. In equation 14 of the paper, P(v) represents the SFG intensity that we have already measured. The unknowns in equation 14 are the values of "beta" and "a_k". By obtaining the values of "a_k", we can calculate the denominator of equation 14, which is a complex value. The MEM phase will then be the phase of these complex values.
Thank you for your assistance. phase, sfg, signal, mem MATLAB Answers — New Questions
How can I read CDF file?
Dear All,
I have a data with the following format"SW_OPER_TECATMS_2F_20131126T000000_20131126T235959_0401.cdf". How can I read it and extract the relevant dat afrom it such as STEC and VTEC?
Best,
AraDear All,
I have a data with the following format"SW_OPER_TECATMS_2F_20131126T000000_20131126T235959_0401.cdf". How can I read it and extract the relevant dat afrom it such as STEC and VTEC?
Best,
Ara Dear All,
I have a data with the following format"SW_OPER_TECATMS_2F_20131126T000000_20131126T235959_0401.cdf". How can I read it and extract the relevant dat afrom it such as STEC and VTEC?
Best,
Ara cdf files MATLAB Answers — New Questions
Help! I’m having difficulty uploading files from my computer to the Matlab Online
Hello,
I am using MATLAB online for the first time. Unlike the versions that I have used before, my data files do not seem to be stored on the online platform, which means that I have to upload them directly from my computer (rather than the shared space on MATLAB online).
How do I go about this? So far using the command line options e.g. load(C:Users…etc) does not work. The error message is:
Error using load
Unable to read file <pathnamefilename>
Can someone please help me? Thank youHello,
I am using MATLAB online for the first time. Unlike the versions that I have used before, my data files do not seem to be stored on the online platform, which means that I have to upload them directly from my computer (rather than the shared space on MATLAB online).
How do I go about this? So far using the command line options e.g. load(C:Users…etc) does not work. The error message is:
Error using load
Unable to read file <pathnamefilename>
Can someone please help me? Thank you Hello,
I am using MATLAB online for the first time. Unlike the versions that I have used before, my data files do not seem to be stored on the online platform, which means that I have to upload them directly from my computer (rather than the shared space on MATLAB online).
How do I go about this? So far using the command line options e.g. load(C:Users…etc) does not work. The error message is:
Error using load
Unable to read file <pathnamefilename>
Can someone please help me? Thank you upload, file, spreadsheet MATLAB Answers — New Questions
Why does MATLAB Online behave so slowly, and even get stuck on the loading page?
I have been using MATLAB online for several days to work on a project remotely. The most recent time I ran my code, I forgot to suppress the output of a loop that cycles through a cell array, causing a large amount of text to try to display in the command window. I used ctrl+c to kill the program, but the webpage became unresponsive. Now, when I try to load MATLAB Online, I get a message that I have a session active, which asks me to log out of that session and start a new one. The page then gets stuck at its initial loading animation. I have let the page attempt to load for over an hour, with no change.
Related to this, MATLAB Online behaves very slowly, even when typing on the Command Window.
I have also tried clearing my cookies and using a different browser.
I have been using MATLAB online for several days to work on a project remotely. The most recent time I ran my code, I forgot to suppress the output of a loop that cycles through a cell array, causing a large amount of text to try to display in the command window. I used ctrl+c to kill the program, but the webpage became unresponsive. Now, when I try to load MATLAB Online, I get a message that I have a session active, which asks me to log out of that session and start a new one. The page then gets stuck at its initial loading animation. I have let the page attempt to load for over an hour, with no change.
Related to this, MATLAB Online behaves very slowly, even when typing on the Command Window.
I have also tried clearing my cookies and using a different browser.
I have been using MATLAB online for several days to work on a project remotely. The most recent time I ran my code, I forgot to suppress the output of a loop that cycles through a cell array, causing a large amount of text to try to display in the command window. I used ctrl+c to kill the program, but the webpage became unresponsive. Now, when I try to load MATLAB Online, I get a message that I have a session active, which asks me to log out of that session and start a new one. The page then gets stuck at its initial loading animation. I have let the page attempt to load for over an hour, with no change.
Related to this, MATLAB Online behaves very slowly, even when typing on the Command Window.
I have also tried clearing my cookies and using a different browser.
matlab, online, rmdir, login, loading, ctrl+c, print, output, slow, time MATLAB Answers — New Questions
interpolate value of 3D points on a meshgrid with a CUSTOM FUNCTION
% particle to mesh interpolation function (NOT ARBITRARY)
H = 3/pi/rCut^2;
u = @(r) H*(1-r/rCut).*(r.^2<=rCut^2);
for k = 1:length(ptcls.q)
r = sqrt((X – ptcls.x(1, k)).^2 + (Y – ptcls.x(2, k)).^2 + (Z – ptcls.x(3, k)).^2);
rho_lr = rho_lr + ptcls.q(k)*u(r);
end
I want to speed up this simple loop where ptcls.q is the value I want to interpolate, X,Y,Z are the points of a meshgrid and ptcls.x is the 3D scattered position of particles inside the mesh. I cannot use scatteredInterpolant function since is slow and does not fit the math behind the problem, any idea on how to speed up the calculation?% particle to mesh interpolation function (NOT ARBITRARY)
H = 3/pi/rCut^2;
u = @(r) H*(1-r/rCut).*(r.^2<=rCut^2);
for k = 1:length(ptcls.q)
r = sqrt((X – ptcls.x(1, k)).^2 + (Y – ptcls.x(2, k)).^2 + (Z – ptcls.x(3, k)).^2);
rho_lr = rho_lr + ptcls.q(k)*u(r);
end
I want to speed up this simple loop where ptcls.q is the value I want to interpolate, X,Y,Z are the points of a meshgrid and ptcls.x is the 3D scattered position of particles inside the mesh. I cannot use scatteredInterpolant function since is slow and does not fit the math behind the problem, any idea on how to speed up the calculation? % particle to mesh interpolation function (NOT ARBITRARY)
H = 3/pi/rCut^2;
u = @(r) H*(1-r/rCut).*(r.^2<=rCut^2);
for k = 1:length(ptcls.q)
r = sqrt((X – ptcls.x(1, k)).^2 + (Y – ptcls.x(2, k)).^2 + (Z – ptcls.x(3, k)).^2);
rho_lr = rho_lr + ptcls.q(k)*u(r);
end
I want to speed up this simple loop where ptcls.q is the value I want to interpolate, X,Y,Z are the points of a meshgrid and ptcls.x is the 3D scattered position of particles inside the mesh. I cannot use scatteredInterpolant function since is slow and does not fit the math behind the problem, any idea on how to speed up the calculation? interpolation, scattered points, meshgrid MATLAB Answers — New Questions
Using matlab in snaptostamps image processing
I am encoutering this issue which wasn’t happening in older releases, the program cannot plot georeferenced images from the selected data folder due to the following errorI am encoutering this issue which wasn’t happening in older releases, the program cannot plot georeferenced images from the selected data folder due to the following error I am encoutering this issue which wasn’t happening in older releases, the program cannot plot georeferenced images from the selected data folder due to the following error arrays, plotting MATLAB Answers — New Questions
create a 3D average plan (or normal) from two 3D plans (or normals)
How can I determine the average plan knowing the plans of the two attached sets of nodes?
load plan_1_2.mat
figure
plot3(plan_1(:,1),plan_1(:,2),plan_1(:,3),’mo’,’Markersize’,4); % normal 1
hold on
plot3(plan_2(:,1),plan_2(:,2),plan_2(:,3),’go’,’Markersize’,4); % normal 2
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
grid off
Or, is it possible to create an average normals?How can I determine the average plan knowing the plans of the two attached sets of nodes?
load plan_1_2.mat
figure
plot3(plan_1(:,1),plan_1(:,2),plan_1(:,3),’mo’,’Markersize’,4); % normal 1
hold on
plot3(plan_2(:,1),plan_2(:,2),plan_2(:,3),’go’,’Markersize’,4); % normal 2
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
grid off
Or, is it possible to create an average normals? How can I determine the average plan knowing the plans of the two attached sets of nodes?
load plan_1_2.mat
figure
plot3(plan_1(:,1),plan_1(:,2),plan_1(:,3),’mo’,’Markersize’,4); % normal 1
hold on
plot3(plan_2(:,1),plan_2(:,2),plan_2(:,3),’go’,’Markersize’,4); % normal 2
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
grid off
Or, is it possible to create an average normals? norm, normal, average, mean, plan, 3d, 3d plots MATLAB Answers — New Questions
Windows 11 Slideshow Wallpaper
For Some reason Windows Slideshow background is not working for me and i am not sure why. Please help
For Some reason Windows Slideshow background is not working for me and i am not sure why. Please help Read More
Is it possible to make a lottery on Excel?
We have a list of 10 names, and we need to randomly select a name to be the winner for the first month. Then, for the second month, we need to pick another winner, but it should not include the winner from the first month. Can you help with setting this up?
We have a list of 10 names, and we need to randomly select a name to be the winner for the first month. Then, for the second month, we need to pick another winner, but it should not include the winner from the first month. Can you help with setting this up? Read More
What to do if you forgot your Word document password?
Hey folks, I’m in a bit of a pickle here. I completely spaced and forgot the password to my Word document. It’s something important and I’m kinda kicking myself for not writing it down somewhere. Has anyone else ever dealt with this? Any advice on how to crack it open or get around the password? Thanks a ton for any help you can give!
Hey folks, I’m in a bit of a pickle here. I completely spaced and forgot the password to my Word document. It’s something important and I’m kinda kicking myself for not writing it down somewhere. Has anyone else ever dealt with this? Any advice on how to crack it open or get around the password? Thanks a ton for any help you can give! Read More
Azure Virtual Desktop with Multiple domains
Can I configure AVD for a single host pool for multiple domains?
Ex: The primary domain is abc.com I need log users from the xyz.com and dds.com domains for a single workspace and host pool.
Can I configure AVD for a single host pool for multiple domains? Ex: The primary domain is abc.com I need log users from the xyz.com and dds.com domains for a single workspace and host pool. Read More
Number in scientific notation on the axis
Hello!
I am getting a bit crazy because I haven’t found a reply yet, and maybe there is no solution.
Anyway, my question is: I have some data with very small values and I don’t mind seeing them in a scientific notation (like 2.84E-07), but when it comes to creating a graph I need to write on the axis the value like 2 x 10^-7 (even better if “-7” is written as a superscript), without any E.
Is there a solution?
Thank you very much,
Ilaria
Hello!I am getting a bit crazy because I haven’t found a reply yet, and maybe there is no solution.Anyway, my question is: I have some data with very small values and I don’t mind seeing them in a scientific notation (like 2.84E-07), but when it comes to creating a graph I need to write on the axis the value like 2 x 10^-7 (even better if “-7” is written as a superscript), without any E.Is there a solution?Thank you very much,Ilaria Read More
Table of Content does not match page numbers
Hi,
I am writing in a word template of my school, they requested me that I add an attachment in my document. That attachment has page numbers in it. So now all the pages after the attachment follow up, meaning that page 40 is 28 because of the attachment. I saw that I could work with sections, but my school added 20 sections in that document…
Anyone that could help me? I can send my document to you if necessary.
Hi,I am writing in a word template of my school, they requested me that I add an attachment in my document. That attachment has page numbers in it. So now all the pages after the attachment follow up, meaning that page 40 is 28 because of the attachment. I saw that I could work with sections, but my school added 20 sections in that document…Anyone that could help me? I can send my document to you if necessary. Read More
Windows 11 start menu not working and app blocked by administrator
Hi,
Following joining an active directory domain with my Windows 11 Pro laptop, the start menu stopped working for all user in the domain, and the local administrator account. If i try to go to Windows Settings (for exemple) i got an error telling me this apps was blocked by my administrator. I can’t go to settings or any others settings function with local administrator account or domain account. This issue not occur on my others PC on this domain. For now, i’ve reinstalled windows, but how to make this issue not happen again when i will join my domain?
Thank you!
Hi, Following joining an active directory domain with my Windows 11 Pro laptop, the start menu stopped working for all user in the domain, and the local administrator account. If i try to go to Windows Settings (for exemple) i got an error telling me this apps was blocked by my administrator. I can’t go to settings or any others settings function with local administrator account or domain account. This issue not occur on my others PC on this domain. For now, i’ve reinstalled windows, but how to make this issue not happen again when i will join my domain? Thank you! Read More
Unable to write to Simulink cache file ‘C:modelname.slxc’ because you do not have write permission for the file.
when I am trying to generate c code from my model, I encounter this error, how to resolve this?
Unable to write to Simulink cache file ‘C:modelname.slxc’ because you do not have write permission for the file.when I am trying to generate c code from my model, I encounter this error, how to resolve this?
Unable to write to Simulink cache file ‘C:modelname.slxc’ because you do not have write permission for the file. when I am trying to generate c code from my model, I encounter this error, how to resolve this?
Unable to write to Simulink cache file ‘C:modelname.slxc’ because you do not have write permission for the file. simulink, code generation MATLAB Answers — New Questions
What is wrong with this code for finding out the number of significant digits after decimal?
I have created this code for finding the number of siignificant digits after decimal for Cody, but for some reason, it shows error (semantic). Can anyone please help identify why? Thank you.
The error comes when I apply:
x = [1.000 1.04 0.22 10.1; 2.05 2.33 4.1 1000.31; 5.00010 6.429 7.492 8.0]
I tried debugging, but the error comes due to 6.429 having a ‘1’ after another 11 zeroes.
Code:
function y = find_max_sigdec(x)
stop = 0;
i = 0;
if x == fix(x)
y = 0;
else
while stop == 0
x = x*10;
i = i+1;
if x == fix(x)
y = i;
stop = 1;
end
end
end
endI have created this code for finding the number of siignificant digits after decimal for Cody, but for some reason, it shows error (semantic). Can anyone please help identify why? Thank you.
The error comes when I apply:
x = [1.000 1.04 0.22 10.1; 2.05 2.33 4.1 1000.31; 5.00010 6.429 7.492 8.0]
I tried debugging, but the error comes due to 6.429 having a ‘1’ after another 11 zeroes.
Code:
function y = find_max_sigdec(x)
stop = 0;
i = 0;
if x == fix(x)
y = 0;
else
while stop == 0
x = x*10;
i = i+1;
if x == fix(x)
y = i;
stop = 1;
end
end
end
end I have created this code for finding the number of siignificant digits after decimal for Cody, but for some reason, it shows error (semantic). Can anyone please help identify why? Thank you.
The error comes when I apply:
x = [1.000 1.04 0.22 10.1; 2.05 2.33 4.1 1000.31; 5.00010 6.429 7.492 8.0]
I tried debugging, but the error comes due to 6.429 having a ‘1’ after another 11 zeroes.
Code:
function y = find_max_sigdec(x)
stop = 0;
i = 0;
if x == fix(x)
y = 0;
else
while stop == 0
x = x*10;
i = i+1;
if x == fix(x)
y = i;
stop = 1;
end
end
end
end significant digits, rounding off MATLAB Answers — New Questions
Distributed digital subarray analysis
clc; clear all; close all;
f = 3e8;
Nx = 10; % number of antennas in subarray
Ns1 = 5;% number of sub array
h = 8; % number of virtual array between subarray
c = 3e8;
lambda = c / f;
dx = 0.42*lambda;
beta = 2 * pi / lambda;
theta = [20];
K = length(theta);
L = round(Nx / 3);
Ri = ones(1,K);
A = 1000;
SNR1 =20;
%% sub array
for Ns = 1 : Ns1
for SNR = 1: SNR1
for l = 1 :A
for m = 1: Ns
for p = 1 : Nx
pos = (m-1)*Nx+p;
P_mp(pos) = (p-(Ns*Nx+(Ns-1)*h+1)/2+(m-1)*(Nx+h));
P_mp1(m,p) = (p-(Ns*Nx+(Ns-1)*h+1)/2+(m-1)*(Nx+h));
end
end
% P_mp1 = P_mp1 + 2*(0.5-rand(Ns,Nx))*pos_var_amp;
A_mp = [];
A_mp_a = [];
E_mp_a = [];
for i = 1:Ns
E_mp(:,:,i) = exp(-1j*beta*P_mp1(i,:)’*dx*sind(theta)); % pole 값
A_mp(:,:,i) = Ri.*E_mp(:,:,i); % 측정 값
A_mp = awgn(A_mp, SNR, ‘measured’); % noise 추가
A_mp1 = sum(A_mp,2);
A_mc(:,:,i) = A_mp1(1:Nx – L + 1,:,i);
A_mr(:,:,i) = A_mp1(Nx – L + 1:Nx,:,i);
A_mk(:,:,i) = hankel(A_mc(:,:,i), A_mr(:,:,i)); % Create Hankel matrix with A_c as the first column and A_r as the last row
E_mp_a = [E_mp_a; E_mp(:,:,i)];
A_mp_a = [A_mp_a ;A_mp1(:,:,i)];
end
%% Hankel stack
Y_ss = A_mk(:,:,1);
if Ns> 1
for z = 2:Ns
Y_ss = [Y_ss ; A_mk(:,:,z)];
end
else
Y_ss = A_mk(:,:,1);
end
[U, S, V] = svd(Y_ss);
V0 = V(:, 1:K);
V1 = V0(1:end-1, :);
V2 = V0(2:end, :);
z_k = eig(pinv(V1) * V2);
find_theta_realarray_MPM(l,:)= asind((imag(log(z_k))*lambda)/(2*pi*dx))’;
rmse_real_mpm(l,:) = sort(theta) – sort(find_theta_realarray_MPM(l,:));
end
rmse_real_MPM_sum = sum(sum(abs(rmse_real_mpm).^2,1),2);
rmse_real_MPM_sum = sqrt(rmse_real_MPM_sum/(A*K));
rmse_real_MPM_sum1(SNR,Ns)= rmse_real_MPM_sum(rmse_real_MPM_sum ~= 0);
end
end
plot(1:SNR1 , rmse_real_MPM_sum1,’-d’,’LineWidth’,1.4)
legend(‘1-subarray’,’2-subarray’,’3-subarray’,’4-subarray’,’5-subarray’)
I think the RMSE should be lower as the subarray increases, but why is the RMSE reversed when the SNR is low?
plz help me…..clc; clear all; close all;
f = 3e8;
Nx = 10; % number of antennas in subarray
Ns1 = 5;% number of sub array
h = 8; % number of virtual array between subarray
c = 3e8;
lambda = c / f;
dx = 0.42*lambda;
beta = 2 * pi / lambda;
theta = [20];
K = length(theta);
L = round(Nx / 3);
Ri = ones(1,K);
A = 1000;
SNR1 =20;
%% sub array
for Ns = 1 : Ns1
for SNR = 1: SNR1
for l = 1 :A
for m = 1: Ns
for p = 1 : Nx
pos = (m-1)*Nx+p;
P_mp(pos) = (p-(Ns*Nx+(Ns-1)*h+1)/2+(m-1)*(Nx+h));
P_mp1(m,p) = (p-(Ns*Nx+(Ns-1)*h+1)/2+(m-1)*(Nx+h));
end
end
% P_mp1 = P_mp1 + 2*(0.5-rand(Ns,Nx))*pos_var_amp;
A_mp = [];
A_mp_a = [];
E_mp_a = [];
for i = 1:Ns
E_mp(:,:,i) = exp(-1j*beta*P_mp1(i,:)’*dx*sind(theta)); % pole 값
A_mp(:,:,i) = Ri.*E_mp(:,:,i); % 측정 값
A_mp = awgn(A_mp, SNR, ‘measured’); % noise 추가
A_mp1 = sum(A_mp,2);
A_mc(:,:,i) = A_mp1(1:Nx – L + 1,:,i);
A_mr(:,:,i) = A_mp1(Nx – L + 1:Nx,:,i);
A_mk(:,:,i) = hankel(A_mc(:,:,i), A_mr(:,:,i)); % Create Hankel matrix with A_c as the first column and A_r as the last row
E_mp_a = [E_mp_a; E_mp(:,:,i)];
A_mp_a = [A_mp_a ;A_mp1(:,:,i)];
end
%% Hankel stack
Y_ss = A_mk(:,:,1);
if Ns> 1
for z = 2:Ns
Y_ss = [Y_ss ; A_mk(:,:,z)];
end
else
Y_ss = A_mk(:,:,1);
end
[U, S, V] = svd(Y_ss);
V0 = V(:, 1:K);
V1 = V0(1:end-1, :);
V2 = V0(2:end, :);
z_k = eig(pinv(V1) * V2);
find_theta_realarray_MPM(l,:)= asind((imag(log(z_k))*lambda)/(2*pi*dx))’;
rmse_real_mpm(l,:) = sort(theta) – sort(find_theta_realarray_MPM(l,:));
end
rmse_real_MPM_sum = sum(sum(abs(rmse_real_mpm).^2,1),2);
rmse_real_MPM_sum = sqrt(rmse_real_MPM_sum/(A*K));
rmse_real_MPM_sum1(SNR,Ns)= rmse_real_MPM_sum(rmse_real_MPM_sum ~= 0);
end
end
plot(1:SNR1 , rmse_real_MPM_sum1,’-d’,’LineWidth’,1.4)
legend(‘1-subarray’,’2-subarray’,’3-subarray’,’4-subarray’,’5-subarray’)
I think the RMSE should be lower as the subarray increases, but why is the RMSE reversed when the SNR is low?
plz help me….. clc; clear all; close all;
f = 3e8;
Nx = 10; % number of antennas in subarray
Ns1 = 5;% number of sub array
h = 8; % number of virtual array between subarray
c = 3e8;
lambda = c / f;
dx = 0.42*lambda;
beta = 2 * pi / lambda;
theta = [20];
K = length(theta);
L = round(Nx / 3);
Ri = ones(1,K);
A = 1000;
SNR1 =20;
%% sub array
for Ns = 1 : Ns1
for SNR = 1: SNR1
for l = 1 :A
for m = 1: Ns
for p = 1 : Nx
pos = (m-1)*Nx+p;
P_mp(pos) = (p-(Ns*Nx+(Ns-1)*h+1)/2+(m-1)*(Nx+h));
P_mp1(m,p) = (p-(Ns*Nx+(Ns-1)*h+1)/2+(m-1)*(Nx+h));
end
end
% P_mp1 = P_mp1 + 2*(0.5-rand(Ns,Nx))*pos_var_amp;
A_mp = [];
A_mp_a = [];
E_mp_a = [];
for i = 1:Ns
E_mp(:,:,i) = exp(-1j*beta*P_mp1(i,:)’*dx*sind(theta)); % pole 값
A_mp(:,:,i) = Ri.*E_mp(:,:,i); % 측정 값
A_mp = awgn(A_mp, SNR, ‘measured’); % noise 추가
A_mp1 = sum(A_mp,2);
A_mc(:,:,i) = A_mp1(1:Nx – L + 1,:,i);
A_mr(:,:,i) = A_mp1(Nx – L + 1:Nx,:,i);
A_mk(:,:,i) = hankel(A_mc(:,:,i), A_mr(:,:,i)); % Create Hankel matrix with A_c as the first column and A_r as the last row
E_mp_a = [E_mp_a; E_mp(:,:,i)];
A_mp_a = [A_mp_a ;A_mp1(:,:,i)];
end
%% Hankel stack
Y_ss = A_mk(:,:,1);
if Ns> 1
for z = 2:Ns
Y_ss = [Y_ss ; A_mk(:,:,z)];
end
else
Y_ss = A_mk(:,:,1);
end
[U, S, V] = svd(Y_ss);
V0 = V(:, 1:K);
V1 = V0(1:end-1, :);
V2 = V0(2:end, :);
z_k = eig(pinv(V1) * V2);
find_theta_realarray_MPM(l,:)= asind((imag(log(z_k))*lambda)/(2*pi*dx))’;
rmse_real_mpm(l,:) = sort(theta) – sort(find_theta_realarray_MPM(l,:));
end
rmse_real_MPM_sum = sum(sum(abs(rmse_real_mpm).^2,1),2);
rmse_real_MPM_sum = sqrt(rmse_real_MPM_sum/(A*K));
rmse_real_MPM_sum1(SNR,Ns)= rmse_real_MPM_sum(rmse_real_MPM_sum ~= 0);
end
end
plot(1:SNR1 , rmse_real_MPM_sum1,’-d’,’LineWidth’,1.4)
legend(‘1-subarray’,’2-subarray’,’3-subarray’,’4-subarray’,’5-subarray’)
I think the RMSE should be lower as the subarray increases, but why is the RMSE reversed when the SNR is low?
plz help me….. ddsa, doa, hankel, svd, snr MATLAB Answers — New Questions
How can I resolve this issue when I try to get c code from simulink model?
Error:Unable to write to Simulink cache file ‘E:Laptop DataPersonalPHD DATAUWPIMyModel.slxc’ because you do not have write permission for the file.Error:Unable to write to Simulink cache file ‘E:Laptop DataPersonalPHD DATAUWPIMyModel.slxc’ because you do not have write permission for the file. Error:Unable to write to Simulink cache file ‘E:Laptop DataPersonalPHD DATAUWPIMyModel.slxc’ because you do not have write permission for the file. code generation MATLAB Answers — New Questions
Named cells
Hi,
I have named a number of cells with one name to address the cells.
Is there any number of a maximum of cells with one name?
wopaedo
Hi,I have named a number of cells with one name to address the cells.Is there any number of a maximum of cells with one name? wopaedo Read More
Pivot table average
Hi everyone. I want to
Hi everyone. I want to calculate average as 116,803,158.95, but pivot table displays as 3,899,938.53. Why is there a difference between them? How could I fix it? thanks.
Hi everyone. I want to Hi everyone. I want to calculate average as 116,803,158.95, but pivot table displays as 3,899,938.53. Why is there a difference between them? How could I fix it? thanks. Read More