I get an error, what's wrong? The 'STRING' input must be either a char row vector or a cell array of char row vector
25 views (last 30 days)
Show older comments
Phan Anh Hoang
on 8 Oct 2018
Edited: Daniya Zafar
on 2 Jan 2022
Hi
I tried to build an app that using below code
----
clear
close all
clc
temp = char('');
while (~ strcmp(temp, 'yes'))
temp = input('Input text here: ','s');
end
After using "Application Compiler" to build the App

I ran exe file, the below message display.

I used R2016a, what was wrong? Please advise!
10 Comments
Dennis
on 8 Oct 2018
I don't think this will work with input. The app is supposed to run without Matlab running or even installed. Hence there is no command line.
Where should you enter anything?
Accepted Answer
Phan Anh Hoang
on 12 Oct 2018
1 Comment
Daniya Zafar
on 2 Jan 2022
Edited: Daniya Zafar
on 2 Jan 2022
Hi Phan, I am using 2021a and get the same error. How do you get to Additional runtime settings?
Weird thing is, everything was working yesterday, I didn't change anything. But now, I get this:
Error using regexprep
The 'STRING' input must be either a char row vector, a cell array of char row vectors, or a string array.
More Answers (1)
KSSV
on 8 Oct 2018
I am not sure, but have a try on this :
close all
clc
temp = cell([],1) ;
temp{1} = char('') ;
count = 1 ;
while (~ strcmp(temp{count}, 'yes'))
count = count+1 ;
temp{count} = input('Input text here: ','s');
end
See Also
Categories
Find more on Entering Commands 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!