How to see content of a cell array for using as input to a call?
Show older comments
I want to read a cell-array, to decide input to a 'input-call'. But the file window opens, but not showing the content before input call ends! Which means I can't see what I shall use as input argument. 'pause' not working. My code jumps over the 'showing of content', waits for 'input', and show the content afterwards. Which are a bit to late then! Please help!
6 Comments
Birdman
on 19 Mar 2018
Share your code.
Steinar Bråten
on 19 Mar 2018
Steinar Bråten
on 19 Mar 2018
[COPIED from section for answers]
% reading the xls file
[num,txt,raw]=xlsread([pathName '/' fileName],1,'A1:W45');
% open the 'raw' cell-array to read info.
openvar raw;
% input of ‘cellnumbers’
speed_row = input('Rownr. Speed: ');
speed_col = input('Colnr. …..
@Steinar: Prefer to edit your submissions instead of posting new ones.
I do not understand any sentence of your question. What does "read a cell array" mean? Where is this cell array stored? What is "the file window"? Which contents is not shown where before which "input call" ends? Where do you want to see what? Where did you insert a pause command? "jumps over the 'showing of content'"?
What is the problem you want to solve?
My understanding is that Steinar wants to be able to see the content of the cell array raw (returned by xlsread) before his code proceeds to ask him (with input) which row/column of that cell array to use. Steinar is using openvar to display the content of that variable, but the variable editor only opens once his code has finished running.
edit: more precisely, I've just tested and the variable editor does open as soon as openvar is called but the content of the variable is only displayed once the script completes. Instead a blank editor is shown when the code reaches the input line. Inserting a drawnow does not resolve the issue (R2017b).
@Steinar, you may need to contact Mathworks directly for help with this.
Steinar Bråten
on 20 Mar 2018
Answers (0)
Categories
Find more on External Language Interfaces in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!