Index in position 1 exceeds array bounds (must not exceed 1).

조회 수: 1 (최근 30일)
Aya Emam
Aya Emam 2023년 5월 19일
댓글: KSSV 2023년 5월 19일
clc
clear all
close all
path = 'H:\radition';
Date= importdata([path '\radd.csv']);
dB = Date(1:360,3);
% pol_1 = 10*log10(Data(1:121,3)./max(Data(1:121,3)));
Theta = Data(1:361,1)*pi/180;
dB = dB-min(dB);
polarplot (Theta,(dB/50))
hold on
  댓글 수: 2
Atsushi Ueno
Atsushi Ueno 2023년 5월 19일
이동: Atsushi Ueno 2023년 5월 19일
The output from importdata function seems to be struct.
Theta (B1:B360) looks like only 90[deg] or 270[deg].
Date= importdata('radd.csv')
Date = struct with fields:
data: [360×7 double] textdata: {360×1 cell} rowheaders: {360×1 cell}
dB = Date.data(1:360,3);
% pol_1 = 10*log10(Data(1:121,3)./max(Data(1:121,3)));
Theta = Date.data(1:360,1)*pi/180;
dB = dB-min(dB);
polarplot (Theta,(dB/50))
hold on
Aya Emam
Aya Emam 2023년 5월 19일
but this is the solution

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2023년 5월 19일
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1388229/radd.csv') ;
dB = T.(3) ;
% pol_1 = 10*log10(Data(1:121,3)./max(Data(1:121,3)));
Theta = T.(1)*pi/180;
dB = dB-min(dB);
polarplot (Theta,(dB/50))
  댓글 수: 3
Aya Emam
Aya Emam 2023년 5월 19일
like 8 can you help me to draw like this by using the same excel sheet pleas sir
KSSV
KSSV 2023년 5월 19일
Try changing the indices i.e. columns.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by