필터 지우기
필터 지우기

The expression to the left of the equals sign is not a valid target for an assignment.

조회 수: 1 (최근 30일)
have someone crashed to this problem? when I run the code blew,an error return. hope someone can help me!
clear all
t0=0;
dt=0.05;
t1=1;
tf=5;
t=[t0:dt:tf];
st=length(t);
n1=floor((t1-t0)/dt)
x1=zeros(1,st);
x(n1)=1/dt;
subplot(2,2,1),stairs(t,x1),grid on
x2=[zeros(1,n1-1),ones(1,st-n1+1);
subplot(2,2,3);
stairs(t,x2);
grid on
w=10;;
u=-0.5;
x3=exp((u+j*w)*t);
subplot(2,2,2),plot(t,real(x3)),grid on;
subplot(2,2,4),plot(t,imag(x3)),grid on;

답변 (1개)

the cyclist
the cyclist 2013년 4월 19일
Looks like you left off the closing bracket in the line
x2=[zeros(1,n1-1),ones(1,st-n1+1);
Guessing it should be
x2=[zeros(1,n1-1),ones(1,st-n1+1)];

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by