フィルターのクリア

Dot indexing not supprted for variables of this type.

1 回表示 (過去 30 日間)
prateek bhadauria
prateek bhadauria 2019 年 7 月 31 日
コメント済み: Adidev Sharma 2020 年 2 月 10 日
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 件のコメント
Image Analyst
Image Analyst 2019 年 7 月 31 日
Also, put before that code this code:
whos params
params
and tell us what you see in the command window.
prateek bhadauria
prateek bhadauria 2019 年 7 月 31 日
Actually it is program where a function is defined by various parameters
function [channel]= here all the parameters are defined which i mentioned below
params=[3,4,5,6];
num_ant_x=1;
num_ant_y=32;
num_ant_z=8;
BW=0.5;
param_num_paths=25;
ofdm_num_subcarriers=1024;
output_subcarrier_downsampling_factor=1;
output_subcarrier_limit=64;
antenna_spacing_wavelength_ratio=0.5;
kd=2*pi*antenna_spacing_wavelength_ratio;
ang_conv=pi/180;
Ts=1/BW;
Mx_Ind=0:1:num_ant_x-1;
My_Ind=0:1:num_ant_y-1;
Mz_Ind=0:1:num_ant_z-1;
Mxx_Ind=repmat(Mx_Ind,1,num_ant_y*num_ant_z)';
Myy_Ind=repmat(reshape(repmat(My_Ind,num_ant_x,1),1,num_ant_x*num_ant_y),1,num_ant_z)';
Mzz_Ind=reshape(repmat(Mz_Ind,num_ant_x*num_ant_y,1),1,num_ant_x*num_ant_y*num_ant_z)';
M=num_ant_x*num_ant_y*num_ant_z;
k=0:output_subcarrier_downsampling_factor:output_subcarrier_limit-1;
num_sampled_subcarriers=length(k);
channel=zeros(M,num_sampled_subcarriers);
and after these commands the for loop section was written which i was posted as my query.
Snapshot of command window - it gives the error "dot indexing is not supported for variables of this type".

サインインしてコメントする。

採用された回答

Bob Thompson
Bob Thompson 2019 年 7 月 31 日
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 件のコメント
prateek bhadauria
prateek bhadauria 2019 年 8 月 3 日
Yes it is working , thank you@Guillaume@Bob Nbob .
Adidev Sharma
Adidev Sharma 2020 年 2 月 10 日
Can you specify what you did to remove the error or please post the updated code

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by