How can I color the part in red using scilab and xfpoly. Is there a way to color the calculated surface just after the integral between two bounds?
Asked
Active
Viewed 150 times
-1
-
Please give again the code of your original post where you had the solution for the computation of integral, it will be easier to answer then. – Stéphane Mottelet Apr 04 '19 at 16:20
-
Dear Faical, Unfortunately despite the fact that we had a very long discussion about how to post high quality questions here in SO I see that you have posted a bad question again. If it was Python or MATLAB tag you would be downvoted and after a couple of times banned from the website. Although Stéphane has been very kind to answer your question, it is not answerable based on the information you have provided. So I'm going to mention some points again and expect you to consider them. – Foad S. Farimani Apr 05 '19 at 15:19
-
1. You can include images in the body of the post. Please do so you question is more understandable. In the comments however use imgur. 2. Please include a [Minimal, Complete, and Verifiable example mcve](https://stackoverflow.com/help/mcve) of what you are doing. 3. Please do your homework, search the internet before asking a question. Search the error messages the functions you are looking for. – Foad S. Farimani Apr 05 '19 at 15:19
-
4. Make sure you have the basic mathematical knowledge. Although Stéphane is a university professor who is able to instruct you, most SO users are not. 5. Please avoid [XY questions](https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). It is ok to say “how should I do this” and then explain “I have tried this”, but not good to say how use xfpoly to do this. – Foad S. Farimani Apr 05 '19 at 15:19
-
6. Interact with the people who help you. Do not post a question and do not show up for a couple of days. Be here. Answer their comments 7. When somebody helps you thank them by a comment, upvote them and accept the best answer. – Foad S. Farimani Apr 05 '19 at 15:19
-
Dear Foad, I respect your point of view, in the first place, I'm sorry for the delay of my answer, so remember that I only have three months in scilab, and when I ask a question about SO, it's is that I spent several hours searching for the answer and I lose hope. but the most difficult handicap is to be French-speaking and not English-speaking, so I do my best to write correctly. – Faical Mekkaoui Apr 15 '19 at 09:02
-
For your information, I am the only one using scilab in my university, everyone uses matlab and the worst is unlicensed, so imagine it. I only have Internet to find the solution to my problems. – Faical Mekkaoui Apr 15 '19 at 09:02
-
@Stéphane Mottelet , thank you very much for your help, may I ask you more questions? I apologize for the delay for reasons beyond my control – Faical Mekkaoui Apr 15 '19 at 09:22
-
OK if these questions concern the above problem. If they concern new topics and ifyou think that my answers could benefit to other users post new questions. – Stéphane Mottelet Apr 16 '19 at 08:31
1 Answers
1
I suppose that your function is called with g(x)
as in your previous post. The following should do what you want:
x=linspace(5,50,200);
plot(x,g(x))
deff('y=f(x,y0)','y=g(x)-y0')
x1 = fsolve(45,list(f,40))
x2 = fsolve(x1,list(f,30))
xv = linspace(x1,x2,1000);
yv = [40 g(xv) 30];
xv = [45 xv 45];
xfpoly(xv,yv,color('red'))

Stéphane Mottelet
- 2,853
- 1
- 9
- 26