# Plotting vehicleCostmap in App designer

조회 수: 1 (최근 30일)
Divya Thakurani 2021년 5월 31일
답변: Sanchari 2024년 5월 3일
Hello all,
I am working on parking area designer using matlab.
i want to show my vehicle cost map on app designer plot window. but i am getting error "Error using plot Data must be numeric, datetime, duration or an array convertible to double."
could any one guide me how to solve this problem?
Any lead will be really supportive me for me!!
Thanks

댓글을 달려면 로그인하십시오.

### 답변 (1개)

Sanchari 2024년 5월 3일
Hello Divya,
The error message indicates that the data you're attempting to plot is not in a format that MATLAB's plot function can handle. To resolve this issue, you need to ensure that the data you're trying to plot is numeric, datetime, duration, or an array that can be converted to a double type. Here are several steps and checks you can perform to troubleshoot and solve this problem:
1. Check the Data Type: Verify the data type of the variables you’re trying to plot by using “whos” command. For example:
whos myVariable;
If your variable is not a numeric, datetime, or duration type, you’ll need to convert it or extract the relevant numeric data for plotting.
2. Convert or Extract Numeric Data: If your data is stored in a table, structure, or object, you might need to extract the numeric data before plotting. For instance, if your data is in a table:
numericData = table2array(myTableVariable);
plot(numericData);
For objects, you might need to access the specific property that holds the numeric data:numericData = myObject.NumericProperty;plot(numericData);
3. Ensure Compatibility with Plot Function: The plot function typically expects vector.
1. Plot function (Mathworks documentation): https://in.mathworks.com/help/matlab/ref/plot.html?searchHighlight=plot&s_tid=srchtitle_support_results_1_plot
Hope this helps!

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by