필터 지우기
필터 지우기

Unbalanced brackets using interp, any ideas?

조회 수: 1 (최근 30일)
MARK THACKWRAY
MARK THACKWRAY 2017년 12월 15일
댓글: MARK THACKWRAY 2017년 12월 15일
Code runs like this and gives me a, Error: File: bassi_bed2b.m Line: 41 Column: 41 Unbalanced or unexpected parenthesis or bracket.
x=1:45; xx=1:.1:45;
yy=interp(x,bed);[((jj);(xx);('cubic'))];
plot(0.033*xx,0.1+(120+yy)/200,'w','linewidth',2)
ylabel('Range (m)','fontsize',fz), xlabel('Distance (m)','fontsize',fz)
hold off

답변 (1개)

Geoff Hayes
Geoff Hayes 2017년 12월 15일
Mark - please review this line
yy=interp(x,bed);[((jj);(xx);('cubic'))];
What is the intent here? Do you really meab
yy=interp(x,bed,[(jj);(xx)],'cubic');
I'm assuming that is what you are intending given the function signature to interp1 (not the interp function that you are using).
  댓글 수: 1
MARK THACKWRAY
MARK THACKWRAY 2017년 12월 15일
Thanks Geoff It was from a friend who swears it works. I just had no idea where to go with it, so I used the edited version you gave me and came up with 'Dimensions of matrices being concatenated are not consistent.'
But i can fix this I think, thanks agian man!

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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by