plot function with its inverse reflection

Hello every one,
If possible..I need plot the function.
The one part of function at the top of the graph, its base at alpha =0.5
and contains an inverse reflection in the down of alpha =0.5
I don't know how to use inverse reflection to the function about alpha =0.5, in my file the inverse reflection is around zero ?,
Or is it better to split one function into two functions and drawing it?but what about alpha?
The output of the drawing like this alpha , with the top and down part of functions
but in some different in shape of function.
If any Prof. can help me in correcting any one of my file ...thanks allots

12 个评论

Do you have any ideas what is wrong with your code? There is no in original formulas. What did you get it from?
I found a mistake in the condition: when x=b or x=c then two rows can be true
Those peaks show that
thanks for reply prof.
in file PLOTFOUR , I just want the reflection to be achieved around y=0.5(or alpha =0.5) instead of zero...
The output shape of the function does not matter if it is a rectangle or something else
Sorry, I just wanted to clarify what I needed, and the mistake in my code
prof. darova, if possible , if you can ...can you explain more so that I can understand??
I put v1 to obtain a shape different to picture(which contain alpha), but also contain reflection around y=0.5.
Now I delete v1, as you spoke
..
.but the output is different to what I need( iam draw in pen)
Why don't just the data?
x1 = x * 0.5;
g2 = g1*0.5;
plot(x1,g2+0.5)
line(x1,-g2+0.5)
I need a, b,c,d check the drawing
If I use this code correctly, it will show me the shape I want, but it does not achieve the values b=2, c=3 ,(part3 = 1 .* (x>=b & x <= c);
which the function is equal to one, between b and c
As i said previously: check the conditions carefully, because a few conditions are met simmultaneously
[a,b,c,d] = deal(1,2,3,4);
x = b;
cond1 = a <= x && x <= b; % condition is met
cond2 = b <= x && x <= c; % condition is met
cond3 = c <= x && x <= d;
[cond1 cond2 cond3]
ans = 1×3 logical array
1 1 0
ok I will check the conditions ...thanks alot prof.darova
hello prof.darova, this homework has been changed to another homework..maybe there is an error in the conditions as you told me earlier
Thank you so much
Was happy to help. Cheers

请先登录,再进行评论。

回答(0 个)

类别

提问:

2021-8-18

评论:

2021-9-1

Community Treasure Hunt

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

Start Hunting!

Translated by