Expression or variable? - MATLAB Cody - MATLAB Central

Problem 3031. Expression or variable?

Difficulty:Rate

Test if arguments of the function are all variables (workspace variables names). Return 1 if yes, 0 if no.

For example :

a=1;

b=2;

c=3;

  • are_variables(a,b) -> 1
  • are_variables(a,b,1) -> 0

Easy ?

Solution Stats

22.22% Correct | 77.78% Incorrect
Last Solution submitted on Jun 23, 2024

Problem Comments

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers22

Suggested Problems

More from this Author43

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page