comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to produce N members between a and b with a determined spacing?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to produce N members between a and b with a determined spacing? [message #68577] Mon, 16 November 2009 06:43 Go to previous message
Steve Eddins is currently offline  Steve Eddins
Messages: 9
Registered: July 2001
Junior Member
ali mozafari wrote:
> Hi there
> I need to produce N members between a and b with a determined spacing.
> In MATLAB it is work like this:
> Data=a:spacing:b
> How can we do this in IDL?
> Any help highly would be appreciated
> A.

If you specify both N and the spacing then you've overconstrained your
problem. The MATLAB syntax you gave spacing the spacing but not N.
This MATLAB function call specifies N but not the spacing:

Data = linspace(a, b, N);

If you really want to specify both N and the spacing then the last
element of Data might not be exactly b.

Say which one you want and then the IDL folks here can tell you how to
do it.

---
Steve Eddins
http://blogs.mathworks.com/steve/
[Message index]
 
Read Message
Read Message
Previous Topic: How to produce N members between a and b with a determined spacing?
Next Topic: Philips MRI to DICOM converter

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:10:08 PDT 2025

Total time taken to generate the page: 0.00308 seconds