Convert arguments in a function call to string, as written
I'm writing a client for a web database that stores array like data, and I'd like to provide a proxy methods that can access data with a matlab array like indexing. Currently I do this by creating a struct with anonymous function member variables that take indeces as a string. For instance:
my_data.my_var('1:end') or my_data.my_var('2:3:22')
Ideally, I'd like to pass in a native range (getting rid of the single quotes), but I don't see how I can prevent the range from expanding before I can convert it to string inside the anonymous function body. Am I overlooking a way I can automatically convert the argument pass to a function directly into a string exactly as it was entered? Is the situation any better with a class method?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で String Parsing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!