slow drawing of a set of points on a plane
Dear Sir
please let me have a help
this is a simple set of statements that:
-define figure 1
-clear the figure
-define a matrix 2 x 82 ,where each column represent the coordinate of a point on a plane
these set of points represent a circle and a cross , centered inside
-then do a loop that draw each point at a time, as red dot
the "hold on" is needed because at each loop i wish to maintain the points already drawed
the purpose of this code is to visualize this figure first undeformed, and after, with some deformation gradient F applied to the set of points, (and) with another (more external) loop , to visualize the advance of the deformation making the gradient F varying
(F not present in the code below)
—————————————-
clear
figure(1),clf
p=[[cos(0:.1:1.9*pi) (-1:.2:1) 0*(-1:.2:1) ]’ [sin(0:.1:1.9*pi) 0*(-1:.2:1) (-1:.2:1) ]’]’
for j=1:max(size(p)) % visualize
figure(1),plot(p(1,j),p(2,j),’r.’),grid on, axis([-2 2 -2 2]),axis(‘square’)
hold on
end
—————————————-
now , to draw this simple figure it take roughly 1 second , so i ask were i’m wrong , and how can I speed up the execution of this code
the specification of the pc is as follow
Device name s.
Processor Intel(R) Pentium(R) CPU G860 @ 3.00GHz 3.00 GHz
Installed RAM 4.00 GB
Device ID ….8C39
Product ID …9
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edition Windows 10 Home
Version 22H2
Installed on 11/7/2020
OS build 19045.4355
Experience Windows Feature Experience Pack 1000.19056.1000.0
Matlab :
ver
—————————————————————————————————–
MATLAB Version: 24.1.0.2689473 (R2024a) Update 6
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
—————————————————————————————————–
MATLAB Version 24.1 (R2024a)
Symbolic Math Toolbox Version 24.1 (R2024a)
>>
Thankyou very much
Kind Regards
manu1965Dear Sir
please let me have a help
this is a simple set of statements that:
-define figure 1
-clear the figure
-define a matrix 2 x 82 ,where each column represent the coordinate of a point on a plane
these set of points represent a circle and a cross , centered inside
-then do a loop that draw each point at a time, as red dot
the "hold on" is needed because at each loop i wish to maintain the points already drawed
the purpose of this code is to visualize this figure first undeformed, and after, with some deformation gradient F applied to the set of points, (and) with another (more external) loop , to visualize the advance of the deformation making the gradient F varying
(F not present in the code below)
—————————————-
clear
figure(1),clf
p=[[cos(0:.1:1.9*pi) (-1:.2:1) 0*(-1:.2:1) ]’ [sin(0:.1:1.9*pi) 0*(-1:.2:1) (-1:.2:1) ]’]’
for j=1:max(size(p)) % visualize
figure(1),plot(p(1,j),p(2,j),’r.’),grid on, axis([-2 2 -2 2]),axis(‘square’)
hold on
end
—————————————-
now , to draw this simple figure it take roughly 1 second , so i ask were i’m wrong , and how can I speed up the execution of this code
the specification of the pc is as follow
Device name s.
Processor Intel(R) Pentium(R) CPU G860 @ 3.00GHz 3.00 GHz
Installed RAM 4.00 GB
Device ID ….8C39
Product ID …9
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edition Windows 10 Home
Version 22H2
Installed on 11/7/2020
OS build 19045.4355
Experience Windows Feature Experience Pack 1000.19056.1000.0
Matlab :
ver
—————————————————————————————————–
MATLAB Version: 24.1.0.2689473 (R2024a) Update 6
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
—————————————————————————————————–
MATLAB Version 24.1 (R2024a)
Symbolic Math Toolbox Version 24.1 (R2024a)
>>
Thankyou very much
Kind Regards
manu1965 Dear Sir
please let me have a help
this is a simple set of statements that:
-define figure 1
-clear the figure
-define a matrix 2 x 82 ,where each column represent the coordinate of a point on a plane
these set of points represent a circle and a cross , centered inside
-then do a loop that draw each point at a time, as red dot
the "hold on" is needed because at each loop i wish to maintain the points already drawed
the purpose of this code is to visualize this figure first undeformed, and after, with some deformation gradient F applied to the set of points, (and) with another (more external) loop , to visualize the advance of the deformation making the gradient F varying
(F not present in the code below)
—————————————-
clear
figure(1),clf
p=[[cos(0:.1:1.9*pi) (-1:.2:1) 0*(-1:.2:1) ]’ [sin(0:.1:1.9*pi) 0*(-1:.2:1) (-1:.2:1) ]’]’
for j=1:max(size(p)) % visualize
figure(1),plot(p(1,j),p(2,j),’r.’),grid on, axis([-2 2 -2 2]),axis(‘square’)
hold on
end
—————————————-
now , to draw this simple figure it take roughly 1 second , so i ask were i’m wrong , and how can I speed up the execution of this code
the specification of the pc is as follow
Device name s.
Processor Intel(R) Pentium(R) CPU G860 @ 3.00GHz 3.00 GHz
Installed RAM 4.00 GB
Device ID ….8C39
Product ID …9
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edition Windows 10 Home
Version 22H2
Installed on 11/7/2020
OS build 19045.4355
Experience Windows Feature Experience Pack 1000.19056.1000.0
Matlab :
ver
—————————————————————————————————–
MATLAB Version: 24.1.0.2689473 (R2024a) Update 6
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
—————————————————————————————————–
MATLAB Version 24.1 (R2024a)
Symbolic Math Toolbox Version 24.1 (R2024a)
>>
Thankyou very much
Kind Regards
manu1965 slow drawing of a set of points on a plane MATLAB Answers — New Questions