<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Le 20/09/2010 14:41, Peng Du a écrit :
<blockquote
cite="mid:AANLkTinP+FuoAX=yjyaQPUM4Tokxfu74G99A9eVHBsuu@mail.gmail.com"
type="cite">Thanks for your replies. They are definitely useful but I
think it would be better to make my problem clearer:<br>
<br>
Different to the example Antoine provided, my data looks more like<br>
data1=[1,5,76,2,7,32,54,6,343,675,454,32,121,5,6,8,]<br>
data2=[3,12,43,54,65,76]<br>
</blockquote>
Do the following:<br>
<br>
t1=linspace(0,1,length(data1));<br>
t2=linspace(0,1,length(data2));<br>
plot(t1, data1,"rx");<br>
plot(t2,data2,"k+");<br>
<br>
Antoine<br>
<br>
<blockquote
cite="mid:AANLkTinP+FuoAX=yjyaQPUM4Tokxfu74G99A9eVHBsuu@mail.gmail.com"
type="cite"><br>
They are the data collected from an experiment and unlikely to have any
mathematical relationship. The first and last value happen at the same
moment ("1" in data1 and "3" in data2 happens simultaneously). The
difference in the sizes of data1 and data2 is due to the different
sampling rate when collecting data.<br>
<br>
What I'd like to do is something like "plot(t,data1); plot(t,data2)"
where t denotes the timespan. So that in the graph the "1" in data1 and
"3" in data2 are aligned to the identical x-axis position (time) whilst
"8" in data1 and "75" in data2 are also aligned. And everything else in
between should be averagely distributed.<br>
<br>
So how can I get it done?<br>
<br>
Thanks very much.<br>
<br>
<div class="gmail_quote">On 20 September 2010 13:08, Francis
Drossaert <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:Francis.Drossaert@pgs.com">Francis.Drossaert@pgs.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-GB">
<div>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);">Just use plot(x,y)
or plot2d(,xy) rather than just plot(y) or
plot2d(y). Scilab will plot irregular sampled data correctly.</span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);">For example this
will plot a straight line even it irregular
sampled:</span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);">x =
[0,1,2,3,4,4.5,5,5.5,6];</span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);">y =
[1,2,3,4,5,5.5,6,6.5];</span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);">plot(x,y);</span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span
style="font-size: 10pt;" lang="EN-US"> Peng Du [mailto:<a
moz-do-not-send="true" href="mailto:eddy.pdu@gmail.com" target="_blank">eddy.pdu@gmail.com</a>]
<br>
<b>Sent:</b> 20 September 2010 12:49<br>
<b>To:</b> <a moz-do-not-send="true"
href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<b>Subject:</b> [scilab-Users] drawing out of two data files</span></p>
</div>
<div>
<div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal">Hi everyone.<br>
<br>
I have two data files containing information of the event with the same
timespan but in different sampling rate, i.e. they have different sizes
but the
first and last line denote the identical moment.<br>
<br>
Is there any way I can draw them in one graph and have them proper
aligned?
Thanks a lot.<br>
<br>
Best regards,<br>
<br>
Peng</p>
</div>
</div>
</div>
<br>
This e-mail, including any attachments and response string, may contain
proprietary information which is confidential and may be legally
privileged. It is for the intended recipient only. If you are not the
intended recipient or transmission error has misdirected this e-mail,
please notify the author by return e-mail and delete this message and
any attachment immediately. If you are not the intended recipient you
must not use, disclose, distribute, forward, copy, print or rely on
this e-mail in any way except as permitted by the author.
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Antoine Monmayrant LAAS - CNRS
7 avenue du Colonel Roche
31077 TOULOUSE
Cedex 4 FRANCE
Tel:+33 5 61 33 64 59
email : <a class="moz-txt-link-abbreviated" href="mailto:antoine.monmayrant@laas.fr">antoine.monmayrant@laas.fr</a>
permanent email : <a class="moz-txt-link-abbreviated" href="mailto:antoine.monmayrant@polytechnique.org">antoine.monmayrant@polytechnique.org</a>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
</pre>
</body>
</html>