clc;clear;close all;
% pirmoji tiesė išreikšta parametrinėmis lygtimis
x1 = @(t) 3+2*t;
y1 = @(t) -1+4*t;
z1 = @(t) 2-1*t;
% antroji tiesė išreikšta parametrinėmis lygtimis
x2 = @(t) 3+4*t;
y2 = @(t) 2+2*t;
z2 = @(t) -2+4*t;
% trečioji tiesė išreikšta parametrinėmis lygtimis
x3 = @(t) 1+2*t;
y3 = @(t) 1+1*t;
z3 = @(t) -3+2*t;
% komanda ezplot3 naudojame nubrėžiant tiesės trimatį grafiką
ez1=ezplot3(x1, y1, z1, [-100, 100], 10, "animate");
set(ez1,'color','r','lineWidth',1)
hold on
ez2=ezplot3(x2, y2, z2, [-100, 100], 10, "animate");
set(ez2,'color','b','lineWidth',2)
hold on
ez3=ezplot3(x3, y3, z3, [-100, 100], 10, "animate");
set(ez3,'color','m','lineWidth',3)
%hold on komanda leidžia viename grafike nubrėžti kelias kreives
Unrecognized function or variable 'T'.
Error in ezplot3 (line 111)
X = ezplotfeval(x,T);
Error in mat_2a (line 18)
ez1=ezplot3(x1, y1, z1, [-100, 100], 10, "animate");

 채택된 답변

Voss
Voss 2021년 12월 17일

0 개 추천

I think the problem is an unrecognized input option passed to ezplot3. Specifically, the 10 causes the input argument list to get parsed incorrectly. Try this instead (also note the single quotes rather than double quotes):
ez1=ezplot3(x1, y1, z1, [-100, 100], 'animate');
and so on for the other calls to ezplot3.

댓글 수: 1

Martyna Juknyte
Martyna Juknyte 2021년 12월 17일
편집: Martyna Juknyte 2021년 12월 17일
edit thank you just deleted the 10 and it worked.

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

추가 답변 (0개)

카테고리

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

제품

태그

질문:

2021년 12월 17일

편집:

2021년 12월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by