About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • Last update: 5 years ago
  • Total downloads: 56
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: Peter Mao (1 other programs)
See full specifications

scripts default iconsubarray (Scripts) Publisher's description

but sometimes, I have a function that returns an array

extracting a subarray from an array is simple:

a = 1:10;
a(4:8) %returns elements 4-8.

but sometimes, I have a function that returns an array, but I only want a subset of that array:

a = foo(x,y,z);
b = a(2,9:end);

Here 'a' is a temporary variable, polluting my workspace. Hence subarray:

b = subarray(foo(x,y,z),2,'9:end');

SUBARRAY should handle all the normal indexing cases (output of FIND, ranges, unspecified dimensions) just like the first example. The only exception is the 'end' keyword, where we have to pass in a string and EVAL it.

I tip my hat to Garret Euler of SUBMAT and SUBMAT_NOEVAL.

System Requirements:

MATLAB 7.8 (R2009a)
Program Release Status: New Release
Program Install Support: Install and Uninstall

subarray (Scripts) Tags:

Click on a tag to find related softwares

Is subarray (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.