Error in a user-define function calling.
Show older comments
Hi, i am returning multiple values from a user-function but this gives an error of Too many output arguments , i don't know where i am making the mistake ?
This is my function calling inside the loop,
for i = 1:no_users
[indexes(:,i), users_data(i,:)] = singleuser_traffic(num_event);
end
And this is the first line of the user-function
function [index, sort_user1] = singleuser_traffic(num_event)
I can't see any mistake in my function call, Thank you so much
Accepted Answer
More Answers (1)
Image Analyst
on 7 Jun 2014
0 votes
Before you call it, check out the size of indexes and users_data.
Inside the function, check the size of index and sort_user1.
Chances are they have different numbers of rows or index and sort_user1 are row vectors instead column vectors.
1 Comment
Aftab Ahmed Khan
on 7 Jun 2014
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!