set function with multiple arguments

Hi , i'm tring to plot two functions x & y in the same graph in function of time , and i'm obliged to update values using ' set function ' . I tried this code but it doesn't work ?
if true
set(plotGraph,'XData',time,'YData',[x y]); end

댓글 수: 2

Jan
Jan 2013년 10월 7일
"It doesn't work" is not a useful description of the occurring problems. Please show us the complete error message of explain the difference between your expectations and the results.
Because we do not now the values of plotGraph, time, x and y we cannot know, what this line exactly means. Please provide more details by editing the original question (hiding important information in comments or pseudo-answers is less useful).
What is the output of the following:
size(time)
size([x y])
get(plotGraph)

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

답변 (1개)

Walter Roberson
Walter Roberson 2013년 10월 7일

0 개 추천

When you plot() with multiple columns, different lineseries() objects are produced for every column. You need to update both of the lineseries() objects with the appropriate individual column of data. You cannot set() a YData to a matrix of data, only a vector.

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

질문:

2013년 10월 7일

답변:

2013년 10월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by