String into plot properties
4 次查看(过去 30 天)
显示 更早的评论
Hello, how can I insert string into plot properties? For example I have cell u=[{'k*'}, {'k-'}] and I want plot(x, y, u(1)) but this shows 'Invalid first data argument'. Any solutions? Thank you very much.
1 个评论
Rik
2018-3-17
Actually, it looks like the x is the first problem you're having. The second problem is that you're using matrix indexing to get a cell in your plot. You should use plot(x, y, u{1})
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!