App designer Textarea issue
    6 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Imrich K
 il 27 Feb 2019
  
    
    
    
    
    Commentato: Jesus Sanchez
      
 il 4 Mar 2019
            Hey people, I am pretty new to matlab programming and I am trying to make an app for my masters thesis. Everything works except one thing, I am trying to read one word from a txt file and push in into the textarea value in appdesigner after a button is pushed. If I read the value of strp, it tells the word and its a string but for some reason it just wont appear in the TextArea :(
Could You help me out, thanks!
            fileID = fopen('Prediction.txt');
            app.predi = textscan(fileID,'%c');
            fclose(fileID);
            x = app.predi{1,1};
            app.strp = convertCharsToStrings(x);
            app.PredikcianruTextArea.Value = app.strp;
2 Commenti
  Kevin Chng
      
 il 27 Feb 2019
				attach your prediction.txt here. It will help if anyone is willing to try out.
Risposta accettata
  Jesus Sanchez
      
 il 27 Feb 2019
        
      Modificato: Jesus Sanchez
      
 il 28 Feb 2019
  
      Did you try to use a char instead of string to show the results in textarea?
app.PredikcianruTextArea.Value = char(app.strp);
This might work. I am not really sure if textarea works with strings or chars, but I would say it is the latter.
PS: I did an app with a textarea and I used it as a means to give feedback regarding the application processes. If I remember correctly, I transformed the strings in chars before assigning them to TextArea.Value. Tomorrow I will look for the code and put it here :)
EDIT: This is the code. Note that the message is defined as char. The circshift is to shift the message to the top position of the textarea
feedback{end+1,1} = 'Connected to PNA';
feedback = circshift(feedback,1);
app.Log.Value = feedback;
4 Commenti
  Jesus Sanchez
      
 il 4 Mar 2019
				No problems! Congratulations in finding the error and good luck with your master thesis!
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Multirate Signal Processing in Help Center e File Exchange
			
	Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


