Error says "Non-MEX version doesn't support plusmin"

2 vues (au cours des 30 derniers jours)
Justin Delmo
Justin Delmo le 22 Mai 2020
Hi Everyone,
I was trying to run this code:
clear all; clc; close all;
%Creating Pacman maze
canvas = zeros(300);
canvas(1:10,1:300)=1;
canvas(1:300,1:10)=1;
canvas(290:300,1:300)=1;
canvas(1:300,290:300)=1;
canvas(280:290,40:120)=1;
canvas(280:290,180:260)=1;
canvas(240:250,40:100)=1;
canvas(240:250,120:180)=1;
canvas(240:250,200:260)=1;
canvas(250:270,145:155)=1;
canvas(210:240,50:60)=1;
canvas(210:240,240:250)=1;
canvas(10:50,145:155)=1;
canvas(30:50,30:70)=1;
canvas(30:50,90:130)=1;
canvas(30:50,230:270)=1;
canvas(30:50,170:210)=1;
canvas(210:220,10:30)=1;
canvas(210:220,270:290)=1;
canvas(210:220,80:120)=1;
canvas(210:220,180:220)=1;
canvas(70:160,260:300)=1;
canvas(70:160,1:40)=1;
canvas(70:110,230:240)=1;
canvas(70:110,60:70)=1;
canvas(70:110,200:210)=1;
canvas(70:110,90:100)=1;
canvas(100:110,100:130)=1;
canvas(100:110,170:200)=1;
canvas(70:80,120:180)=1;
canvas(80:110,145:155)=1;
canvas(130:160,120:180)=1;
canvas(180:190,120:180)=1;
canvas(190:220,145:155)=1;
canvas(150:190,90:100)=1;
canvas(150:190,200:210)=1;
canvas(180:190,50:80)=1;
canvas(180:190,220:250)=1;
canvas(150:160,50:80)=1;
canvas(150:160,220:250)=1;
canvas(100:110,50:60)=1; %added manually
idisp(canvas)
%Distance Transform command
goal = [200,251]; %goal point
start = [20,20]; %start point
dx = DXform(canvas); %create navigation object
dx.plan(goal); %create plan for specified goal
dx.query(start); %animate path from this start location
And I got an error saying
Error using imorph (line 69)
Non-MEX version doesn't support plusmin
Error in distancexform (line 124)
occgrid = imorph(occgrid, m, 'plusmin');
Error in DXform/plan (line 161)
dx.distancemap = distancexform(dx.occgridnav, dx.goal, dx.metric, show);
Error in Lab2Q5c (line 51)
dx.plan(goal); %create plan for specified goal
What do I do?

Réponses (0)

Catégories

En savoir plus sur Simulation dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by