Dot indexing not supprted for variables of this type.
3 views (last 30 days)
Show older comments
prateek bhadauria
on 31 Jul 2019
Commented: Adidev Sharma
on 10 Feb 2020
i am facing issue while i am running my code
for l=1:1:param_num_paths
gamma_x=1j*kd*sin(params.DoD_theta(l)*ang_conv)*cos(params.DoD_phi(l)*ang_conv); % showed error in this line
gamma_y=1j*kd*sin(params.DoD_theta(l)*ang_conv)*sin(params.DoD_phi(l)*ang_conv);
gamma_z=1j*kd*cos(params.DoD_theta(l)*ang_conv);
gamma_comb=Mxx_Ind*gamma_x+Myy_Ind*gamma_y + Mzz_Ind*gamma_z;
array_response=exp(gamma_comb);
delay_normalized=params.ToA(l)/Ts;
channel=channel+array_response*sqrt(params.power(l)/ofdm_num_subcarriers)*exp(1j*params.phase(l)*ang_conv)*exp(-1j*2*pi*(k/ofdm_num_subcarriers)*delay_normalized);
end
i already defined the respective values which is used in this code , but when i am running it gives an error " Dot indexing is not supported for variables of this type".
3 Comments
Image Analyst
on 31 Jul 2019
Also, put before that code this code:
whos params
params
and tell us what you see in the command window.
Accepted Answer
Bob Thompson
on 31 Jul 2019
You're getting the error because you're calling params like a structure, 'params.DoD_phi(1),' but you previously defined params as a simple double matrix.
4 Comments
Adidev Sharma
on 10 Feb 2020
Can you specify what you did to remove the error or please post the updated code
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!