What am I doing wrong with object oriented programming?
Mostra commenti meno recenti
This is hopefully a very straight forward problem. I've tried looking through the documentation, but everything I'm doing seems legit so here I am.
I have a .m file ParticleInBox.m
classdef ParticleInBox
properties
end
methods
function q = calculateSin(x)
q = sin(x);
end
end
If I try
>> p = ParticleInBox();
>> p.calculateSin(2.0)
Error using ParticleInBox/calculateSin
Too many input arguments.
Any ideas why it is complaining about too many input arguments?
Thanks!
Mark
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Construct and Work with Object Arrays in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!