Unable to use a value of type matlab.gra​phics.prim​itive.Line as an index. How do i fix this?

2 views (last 30 days)
fodo=[ 1 1 2.5 0 ;
5 1 1.0 0 ;
1 1 1.5 0 ;
4 1 2.0 60;
1 1 1.5 0 ;
5 1 1.0 0 ;
1 1 2.5 0 ]
ring=repmat(fodo,6,1);
beamline=repmat(fodo,6,1)
dv=[0;0;beamline(line,3)]; dw=eye(3);
Unable to use a value of type matlab.graphics.primitive.Line as an index.

Accepted Answer

Ameer Hamza
Ameer Hamza on 1 Nov 2020
'line' is MATLAB's built-in function. You haven't defined it as something else in your code. Therefore, the statement
beamline(line,3)
causes error.

More Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!