In a program I am writing, I am trying to use varargout to contain

the number of matrices that I will need to graph in the next

function. For some reason, when I return varargout, I only get one

matrix and not all of them.

Then I wrote a simple program to test what was going on and I'm

getting the same thing. Can anyone help me out?

function [ output_args ] = testingvarargin( numberOfArgs )

%UNTITLED1 Summary of this function goes here

% Detailed explanation goes here

x = 0

x = callingArgs(numberOfArgs)

x

output_args = readingArgs(x)

function [varargout] = callingArgs(number)

%we'll use "number" to pass that number, times two or three,

arguments back

%using varargout...

if (mod(number, 2))

varargout = cell(1,3);

varargout(1) = {'Testing text'};

varargout(2) = {zeros(4,5)};

varargout(3) = {number};

else

varargout = cell(1,2);

varargout(1) = {'Testing text'};

varargout(2) = {eye(number)};

end

size(varargout)

varargout

function [output_array] = readingArgs(input_array)

%we'll now read in our previous varargout and see why this is doing

what

%it's doing.....

size(input_array)

output_array = input_array

In article < XXXX@XXXXX.COM >, XXXX@XXXXX.COM

says...

You need to call your function with varargout with multiple output

values, e.g.,

[x,y,z,a,b,c,k] = callingArgs(numberOfArgs)

--Loren

says...

You need to call your function with varargout with multiple output

values, e.g.,

[x,y,z,a,b,c,k] = callingArgs(numberOfArgs)

--Loren

1. My I's are coming up i's. (lower case)

2. Class C in-addr.arpa delegation, am I doing this correctly?

3. GIT question - am I doing it correctly?

4. A trivial problem with Tk, I am sure I am not doing it the right way

6. Am I doing this Grub2 upgrade correctly in my old Debian box?

8. Am I doing this correctly - exceptions!

10. Restricted Group Problem My Scenario and problem..what am i doing

11. I am having trouble adding a poem....what am I doing wrong?

12. I am doing a calculation in excel, I am multiplying a figure by a

13. I am stupid and don't know what the heck I am doing wrong on t

14. I am having problems with word not correctly indexing entries

15. preloader problem , am i passing variable names correctly ?

2 post • Page:**1** of **1**