필터 지우기
필터 지우기

plotting 2d graphs with decimals

조회 수: 10 (최근 30일)
Monaco
Monaco 2024년 8월 24일 9:39
답변: Star Strider 2024년 8월 24일 10:50
I want to plot graph but gives me this error. this is the code i used
time_X_core224_6= readmatrix("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","A3:A4401")
time_X_core224_7= readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","G3:G4401")
time_X_core224_9= readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","M3:M4401")
time_X_core224_28= readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","S3:S4401")
time_X_core224_38= readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","Y3:Y4401")
time_X_core156421= readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","AE3:AE4401")
Core224_6_KY = readmatrix("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","AZ4:BE4")
Core224_7_KY = readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","AZ9:BE9")
Core224_9_KY = readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","AZ14:BE14")
Core224_28_KY = readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","AZ19:BE19")
Core224_38_KY = readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","AZ24:BE24")
Core224_156421_KY = readtable("Лист Microsoft Excel.xlsx","Sheet","Лист1","Range","AZ29:BE29")
KY_Fig = plot(time_X_core224_6,Core224_6_KY)
Any solutions?

답변 (1개)

Star Strider
Star Strider 2024년 8월 24일 10:50
There appear to be two problems.
First, you are plotting tables. You have to plot the variables from the tables instead. See Access Data in Tables for details.
Second, you are plotting a (4399,1) vector against a (1x6) matrix. That will simply not work in any context.
It would be best to upload at least two of your Excel files (preferebly all of them, use the ‘paperclip’ icon just to the right of the Σ icon) and explain what you want to do with them.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by