필터 지우기
필터 지우기

Plotting a function error

조회 수: 1 (최근 30일)
Krish Desai
Krish Desai 2016년 3월 14일
답변: Image Analyst 2016년 3월 14일
I'm trying to plot the following: y=((e^(-6t))/6)*(1-9e^(6t)+14e^(6t)
t=-10:1:10;
plot (t,((exp(-6*t))/6)*(1-9*exp(4*t)+14*exp(6*t)))
but the error message "inner matrix dimensions must agree" pops up. What a I doing wrong?

채택된 답변

Image Analyst
Image Analyst 2016년 3월 14일
Whever you see that, try using dots before the mathematical operators. In other words, use .* instead of *
t=-10:1:10;
y = (exp(-6*t) / 6) .* (1-9*exp(4*t)+14*exp(6*t))
plot(t, y, 'b*-')

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by