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

Home » Public Forums » archive » Another "Array subscript for VECTOR must have same size as source expression." problem
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: Another "Array subscript for VECTOR must have same size as source expression." problem [message #88463 is a reply to message #88462] Tue, 29 April 2014 12:17 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Tuesday, April 29, 2014 2:27:58 PM UTC-4, laura...@gmail.com wrote:


> plotstats = fltarr(5,nsites)

The BOXPLOT documention says that the VALUES parameter should be dimensioned M x 5 -- it looks like you have the transpose

What make the problem hard to diagnose is that the BOXPLOT() function does not play nice with the input parameters


IDL> plotstats = findgen(5,12)
IDL> help,plotstats
PLOTSTATS FLOAT = Array[5, 12]
IDL> saa = boxplot(indgen(12),plotstats)
IDL> help,plotstats
PLOTSTATS FLOAT = Array[12, 5]

So it looks like BOXPLOT has transposed the input data, so the second time through the plotstats variable is dimensioned [12,5] whereas you are assuming that is dimensioned [5,12], giving the array subscript error. --Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Smooth and /EDGE_TRUNCATE
Next Topic: How to close 'failed' function graphics windows?

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

Current Time: Sat Oct 11 14:41:57 PDT 2025

Total time taken to generate the page: 0.96228 seconds