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");

 Accepted Answer

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 Comment

edit thank you just deleted the 10 and it worked.

Sign in to comment.

More Answers (0)

Categories

Products

Tags

Community Treasure Hunt

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

Start Hunting!