Asked by prateek bhadauria
on 31 Jul 2019

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

Answer by Bob Nbob
on 31 Jul 2019

Accepted Answer

prateek bhadauria
on 1 Aug 2019

Guillaume
on 1 Aug 2019

The problem had nothing to do with which computer you're running it on.

As Bob correctly pointed out, if you create params like this:

params=[3,4,5,6];

then

params.DoD_phi(1)

is always going to be an error, on any computer, in any version of matlab.

prateek bhadauria
on 3 Aug 2019

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 3 Comments

## Guillaume (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/474259-dot-indexing-not-supprted-for-variables-of-this-type#comment_730200

## Image Analyst (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/474259-dot-indexing-not-supprted-for-variables-of-this-type#comment_730202

## prateek bhadauria (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/474259-dot-indexing-not-supprted-for-variables-of-this-type#comment_730210

Sign in to comment.