Fidele - since your function signature is
function [a,b,c] = trial_function(num)
then you need to assign values to each of the three output variables which you are not currently doing
if num==2
a=10;
b=5
elseif num==4
c=100;
end
The easiest solution is to just assign default values to these three variables as
a = 0;
b = 0;
c = 0;
if num==2
a=10;
b=5
elseif num==4
c=100;
end
But is the above code really what you want? Do you want to assign different values to a and b and c if num is 2 or 4 or any other integer?