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

2 vues (au cours des 30 derniers jours)
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);

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by