Jump to content

MATLAB Nargout Function

Featured Replies

The MATLAB website states that "the number of arguments is negative if the function has a variable number of arguments" when I use nargin to test such functions.

 

So when I enter nargout ode45, I get -5. But why is the absolute value 5, does that mean it's the maximum number of outputs that ode45 can release? It is not a random number because I keep getting the same result after typing in.

 

Does anyone know why this is happening? Thank you :D

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.