plz send me the answer

x=1:7
n=-3:3
need y[n]=x[2n+3] ?
plz send me the answer " fadi.sam@live.com "

답변 (5개)

Walter Roberson
Walter Roberson 2012년 3월 26일

0 개 추천

This is not possible in MATLAB, as MATLAB arrays cannot be indexed at negative numbers or 0, but you want to index y at -3, -2, -1, and 0, along with 1, 2, and 3.

댓글 수: 1

fadi rami
fadi rami 2012년 3월 26일
YES WALTER I MEAN " the value when x=1 is -3 and when x=2 the value is -2 etc , and i need for this shape make scaling and shifting
Geoff
Geoff 2012년 3월 26일

0 개 추천

I think you mean this:
x = -3:3;
y = 2 * x + 3;
plot(x, y);

댓글 수: 3

fadi rami
fadi rami 2012년 3월 26일
no man i mean " the value when x=1 is -3 and when x=2 the value is -2 etc , and i need for this shape make scaling and shifting
Geoff
Geoff 2012년 3월 26일
So you mean:
x = 1:7;
y = -3:3;
Here, y is "the value when x=1 is -3... etc", and you access it like this: y(1)
Geoff
Geoff 2012년 3월 26일
Alternatively, if you really did mean n = -3:3 and y = 2n + 3, then:
x = 1:7;
n = -3:3;
y = 2*n + 3;
Image Analyst
Image Analyst 2012년 3월 26일

0 개 추천

Nourhan
Nourhan 2026년 8월 14일 19:37
편집: Nourhan 2026년 8월 14일 20:58

0 개 추천

MATLAB does not allow negative or zero indices. MATLAB array indexing must start at 1
atta
atta 대략 18시간 전
편집: atta 대략 18시간 전

0 개 추천

y[n]=x[2n+3]
with x=[1,2,3,4,5,6,7] and n=3:3.

This question is locked.

카테고리

도움말 센터File Exchange에서 Fractals에 대해 자세히 알아보기

질문:

2012년 3월 26일

Locked:

대략 8시간 전

Community Treasure Hunt

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

Start Hunting!

Translated by