How to use structure variables from one matlab file inside a classdef which creates function and use in another matlab file

11 views (last 30 days)
I am new to OOP in matlab.
I have lot of data which I classify into different m files. and creating functions inside a classdef which can be used directly in one outfile m file.
I have attached duplicate scripts for reference.
I am unable to run the final m file. Its throwing error as
Unable to resolve the name par.a.
Error in funcs.func1 (line 7)
res = (x*(par.a +par.b +par.c))+con.gravity;
Error in Outfile (line 5)
result = funcs.func1(z);

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by