Output of a Function in a graph and table
Show older comments
I have a set of functions that I need to express as a graph as well as show the data in a table in separate figures. How do I go about this? The disp function did not work out nor is using the basic 'table' code since it requires data to already be there. Thank you for your help!
7 Comments
dpb
on 27 May 2019
No idea what you're trying to accomplish, specifically, sorry...
At least show a function and some represeantion of what is the issue you ran into when you tried to solve the problem.
Of course a table has to be populated with something -- how would you show anything otherwise???
Have you tried ezplot for a start?
Hassan Ghanem
on 28 May 2019
KALYAN ACHARJYA
on 28 May 2019
Is this both y?
y = x1;
y = x1^2 + x2
Hassan Ghanem
on 28 May 2019
dpb
on 28 May 2019
"obtain a figure of the data table such that we can see the actual data, like:"
Where do you want this? There's the variable editor/viewer or you can evaluate the function(s) for a set of x and disp them something like
disp([y x1 x2])
or put them into a table
table(y,x1,x2)
which brings along a variable name header or you can write them out in whatever format you wish w/
fmt=[repmat('%05.2f',1,3) '\n'];
fprintf(1,[y x1 x2].')
It still really isn't at all clear just what you're trying to accomplish for what purpose.
Hassan Ghanem
on 30 May 2019
dpb
on 30 May 2019
Look at uitable or the text function, perhaps...
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!