About how to plot 5 values in 2-D

The problem is I have 5 values in my excel. I have to use them to plot those information in 2-D.5 values are month, day hour, demand and price. Here is the code I have
[v,T,vT]=xlsread('vermont_demand_price_2007.csv')
% 'xlsx' for exell 2007
%v: Double
%T and vT : cell
%use v containing numbers
t=v(:,3);y=v(:,5)
%if u have to plot second colone depending on first:
plot(t,y);
cubic_function=spline(t,y);
input = .1:.01:10;
plot(t,y)
hold on
plot(input,ppval(cubic_function,input),'r')
but it does not like what I want it to be.

1 件のコメント

sam0037
sam0037 2016 年 2 月 19 日
Hi,
Please elaborate on the error message you observe or share the snapshot of the error message. Also, if possible share the file ' vermont_demand_price_2007.csv' as this would help in debugging.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

質問済み:

Sui
2016 年 2 月 15 日

コメント済み:

2016 年 2 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by