Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I'm not sure exactly what you are asking for. My interpretation is that you want to write a function that returns a matrix. I have some doubt because I think that maybe you are looking to define a matrix with some variables in it, and you want the matrix to be updated whenever you update the variables.
For either of those, perhaps you can do something like this:
In junk.m
Code:
function B = junk (a,b,c,d)
B = [a, b ; c, d];
endfunction
You can call the function with the input variables wherever you would have been using the matrix variable that you were using.
thank but i mean tha i have
my function: for exemple matrix (1x7) zise
one var x for exemple cost in (1x7) zise and i want choose this matrixe from data
for exemple i have 7 cost and i want chose 5 best cost
how i define this matrix and how choose the best 5 cost if i give sum of my cost for exemple equal 20 dollars oki
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.