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

1 回表示 (過去 30 日間)
Hi,
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);

回答 (0 件)

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by