[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
M-file will only return one variable
From: |
Jason Martin |
Subject: |
M-file will only return one variable |
Date: |
Wed, 10 Mar 2010 16:51:58 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
Good afternoon list,
I am working on a small set of m-files for my microwave circuits
class and I am trying to return one answer in two different formats. My
m-file is:
function [retrad, retang] = chebtran(ZL,Z0,Gm,NumSec)
pr0 = log(ZL/Z0);
pr1 = acosh((1/0.1)*(pr0));
pr2 = cosh((1/NumSec)*(pr1));
pr3 = asec(pr2);
pr4 = pr3*180/pi;
retrad = pr3;
retang = pr4;
endfunction
My issue is, only one variable is returned. In the current order,
I will get the radian answer, retrad, but not the angle answer, retang.
But if I put retang first, I will only get the angle and not the
radian. According to the manual this should be correct, but I cannot
figure out why I am not getting both answers to return properly.
Thanks in advance for any help.
Jason