Variable for range in xlswrite
1 次查看(过去 30 天)
显示 更早的评论
I have define a variable which is beeing calculated automaticaly.
This variable has been define
a = [starcell ':', endcell]
and it give me e.g.
a = g12: h12
Now when i write
xlswrite('1.xls', Y, 3, a) it doesn't want to understand the range. The variable a is a character string . Does anybody have any idea?
0 个评论
采纳的回答
Sven
2011-11-18
Providing a variable as a string should be exactly the same as providing that string directly. Here are 3 possibilities that I can think of:
1. Did you intend to have the space " " character in the string "g12: h12". Try it without the space.
2. Make sure that the variable Y matches exactly the size you defined with g12:h12 (ie, it's 1-by-2)
3. Try uppercase 'G12:H12'
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!