Finding the distance between two points in an image

조회 수: 1 (최근 30일)
Alvin Huang
Alvin Huang 2019년 11월 21일
답변: Rik 2019년 11월 21일
Hi there,
I need help with creating a line between two points over an image which will give me the distance.
I tried running it, but it gave me an error.
Error: File: startDrawing.m Line: 1 Column: 1
Function definitions are not permitted in this context.
This is the link I am using:

답변 (1개)

Rik
Rik 2019년 11월 21일
You are using R2016a, but using functions in scripts was introduced in R2016b. The documentation page you linked does not mention this, because it assumes you are running the latest release.
You can either move all functions to their own file, or make the script part a function as well.
Note that some functions or syntax options might have been introduced between R2016a and R2019b, so the example might not work in your release.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by