필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Subtraction between matrix elements

조회 수: 1 (최근 30일)
Michael
Michael 2018년 8월 12일
마감: Stephen23 2018년 8월 12일
Hello,
This should be straight forward but I can't seem to get the syntax correct. Basically, I have a matrix of (x, y) coordinates in a 4 by two matrix. And I want to calculate the distance between y values. By issue is that some of the coordinates have negative values. I know for scaler values this works
a= 3; b= -5; c= a-b;
but
% these are the array values
0 0.750000000000000
0 0
0 -0.500000000000000
0 -0.750000000000000
% I have tried both of these
DistY2 = minus(line1 (1,2), line (3,2));
DistY2 = (line1 (1,2) - line (3,2));
% and the error I get is below Undefined operator '-' for input arguments of type 'matlab.graphics.primitive.Line'.
Error in PlotCurve (line 50) DistY2 = (line1 (1,2)- line (3,2));

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by