why i am getting "Ambiguous property found while using line" error?

6 visualizaciones (últimos 30 días)
i am trying to draw a line from the accelerometer data.. code is as shown below
[gx,gy,gz] = readAcc(accelerometer);
disp(gx);
line([0 gx],[0 0],'Color','r','LineWidth',2,'Marker','o');
but i am getting error as
Error using line
Ambiguous property found.
Object Name : line
Property Name : ''.
Error in vector (line 45)
line([0 gx],[0 0],'Color','r','LineWidth',2,'Marker','o');
what might be the cause and how to resolve this problem? it does not display any property name..

Respuesta aceptada

Walter Roberson
Walter Roberson el 29 de En. de 2016
Try the full
line('XData', [0 gx], 'YData', [0 0],'Color','r','LineWidth',2,'Marker','o');
  7 comentarios
Gowrishankar R
Gowrishankar R el 30 de En. de 2016
That worked...thank you very much..
Gowrishankar R
Gowrishankar R el 30 de En. de 2016
hello Walter Roberson, sorry for asking so many questions again and again, i am encountered another error.. i have 2 .m files readAcc.m and vector.m.. in command window if i type
[accData1 accData2 accData3]=readAcc(accelerometer)
i get as accData1 = 1.0100
accData2 = -0.0400
accData3 = -0.2700
but when i run vector.m file which has function call as [accData1 accData2 accData3] = readAcc(accelerometer); after that function call if put disp(accData1); i get as 51__ or something like that.. why is like that?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by