Jump to content

Stan West

Members
  • Posts

    2
  • Joined

  • Last visited

Stan West's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Ton, I agree that the memory error makes sense when such a large array is being initialized. However, my concern was not with that error itself but rather that such a situation (and a terminal error) would arise simply because one parameter of the start:step:end range operation is an empty matrix. Now I created such a situation accidentally, due to an error in my prior code, and having an empty matrix in a range doesn't seem useful, so this specific condition may be uninteresting in practice. Nevertheless, I would rather see MC_Range.vi behave better for odd inputs. For comparison, the behavior of Matlab 7.0 is as follows: >> range=[]:1 Warning: Colon operands must be real scalars. range = Empty matrix: 1-by-0 Apparently, it prints a warning to the console but otherwise continues execution with a type of empty matrix as the range result.
  2. The attached VI contains a MathScript node that creates a range with an empty matrix as the start index. Rather than raising an error in an error cluster, MC_Range tries to initialize an array of size 2147483647; LabVIEW then halts VI execution and raises a dialog box that reads, "LabVIEW: Memory is full. VI 'MC_Range Test.vi' was stopped at Initialize Array 0x430C of subVI 'MC_Range.vi'." The same problem occurs if the step or end of the range are empty. Download File:post-4854-1157639128.vi
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.