<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thank you for that info. I didn't realize you can have multidimensional float-vectors, nor knew how to go about that. This helps.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Jim<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> cmdist-bounces@ccrma.Stanford.EDU <cmdist-bounces@ccrma.Stanford.EDU> on behalf of cmdist-request@ccrma.Stanford.EDU <cmdist-request@ccrma.Stanford.EDU><br>
<b>Sent:</b> Thursday, September 7, 2023 9:00 AM<br>
<b>To:</b> cmdist@ccrma.Stanford.EDU <cmdist@ccrma.Stanford.EDU><br>
<b>Subject:</b> Cmdist Digest, Vol 184, Issue 1</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Send Cmdist mailing list submissions to<br>
cmdist@ccrma.stanford.edu<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
or, via email, send a message with subject or body 'help' to<br>
cmdist-request@ccrma.stanford.edu<br>
<br>
You can reach the person managing the list at<br>
cmdist-owner@ccrma.stanford.edu<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Cmdist digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. cons value for float vector (James Hearon)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 7 Sep 2023 17:47:11 +0000<br>
From: James Hearon <j_hearon@hotmail.com><br>
To: "cmdist@ccrma.Stanford.EDU" <cmdist@ccrma.Stanford.EDU><br>
Subject: [CM] cons value for float vector<br>
Message-ID:<br>
<BYAPR10MB2536562C85954CF25C290386E5EEA@BYAPR10MB2536.namprd10.prod.outlook.com><br>
<br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
<br>
Hi,<br>
I'm having a difficult time trying to create two columns of data (or three or four etc.) in a float vector.<br>
A list works fine, but the vector gives an error that the data is a pair but should<br>
be a real. I could use make-env for this probably, but seems like I should<br>
be able to get the vector to cooperate. I'm wondering what I'm misunderstanding or if there's<br>
a better way to think of this such as individual vectors then zip them together?<br>
Thanks,<br>
Jim<br>
<br>
;float vector XXX<br>
(let* ((fsize 10)<br>
(im (make-float-vector fsize))<br>
(x 1)<br>
(y 1.0)<br>
)<br>
(do ((k 0 (+ k 1)))<br>
((>= k fsize))<br>
(set! (im k) (cons x y)) ;XXX is a pair but should be a real?<br>
;(float-vector-set! im k (cons x y))<br>
(format #t "~% ~A ~A" k (im k) )<br>
(set! x (1+ x))<br>
(set! y (1+ y))<br>
))<br>
<br>
;list OK<br>
(let* ((fsize 10)<br>
(mylist (make-list fsize))<br>
(x 1)<br>
(y 1.0)<br>
)<br>
(do ((k 0 (+ k 1)))<br>
((>= k fsize))<br>
(set! (list-ref mylist k) (cons x y))<br>
(format #t "~% ~A ~A" k (list-ref mylist k))<br>
(set! x (1+ x))<br>
(set! y (1+ y))<br>
))<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20230907/2168650d/attachment-0001.html">https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20230907/2168650d/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Cmdist mailing list<br>
Cmdist@ccrma.stanford.edu<br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
<br>
<br>
End of Cmdist Digest, Vol 184, Issue 1<br>
**************************************<br>
</div>
</span></font></div>
</body>
</html>