MATLAB: Can some one please help me in passing the particular parameter from one function to another. passing the parameter from one fuction to another Hi There, I want to pass that "codebk" of vector.m to the test.m as input over there…"code". Can someone pls help with this. I have attached the codes with this query for your kind pursual. Best Answer Hi,write a third script and call it for example main.m containing the following code:% Define needed inputs for the functionsd = ... K = ...testdir = ...n = ...% Call vector.m to get codebk as outputcode = vector(d, K);% Use the codebk as input for the call of test.mtest(testdir, n, code);This code calls vector.m with the given inputs and returns codebk as result which is named code here. Then it calls test.m with the result you got.Best regardsStephan Related SolutionsMATLAB: Calling a file which is in folder in current folder Add the folder to your MATLAB path. Or cd to the other directory and invoke the routine.If the code to be invoked is a script instead of a function, see run() MATLAB: Swapping elements from one matrix to another. Read about logical indexing. A(A<0) = B(A<0) ; Related QuestionHow can one refer to the calculation in a function m-fileAlign an image according to another.
Best Answer