Filter löschen
Filter löschen

getting string from gui textbox into dsolve

3 Ansichten (letzte 30 Tage)
Can
Can am 12 Nov. 2014
Bearbeitet: Mikhail am 12 Nov. 2014
hello, i'm a beginner so this might be an easy question but i couldn't find an answer yet. how can i get the text written in a textbox in the gui and use it in the dsolve function? like so:
dsolve('Dy=x^2','y(1)=1',x)
x^2 has to be extracted from the textbox. thanks in advance!

Antworten (1)

Mikhail
Mikhail am 12 Nov. 2014
Bearbeitet: Mikhail am 12 Nov. 2014
After reading the strings ('Dy=x^2' , 'y(1)=1' , 'x') you should convert everything into cell array ( mat2cell ).
Now you can call your dsolve (a) where are is cell array: a{1}='Dy=x^2' and so on.
Hope you know how to get string from textbox (with function get)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by