how to substitute one funtion into integration with infinity as upper limit in maple? [closed] - maple

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
This post was edited and submitted for review 3 days ago.
Improve this question
When I substitue the function in to the integration with infinity as upper limit, maple fails.
https://i.stack.imgur.com/VAkeO.jpg
https://i.stack.imgur.com/ujfGS.jpg
I can substitue successfully the function in to the integration with another variable as upper limit as shown in the figure. I hope to keep the infinity symbol in the substituted result.
The following is the plain text code:
f := u -> theta*exp(-theta*u);
subs(f(u__b) = f(u), int(h(Q, u__b)*f(u__b), u__b = q__a .. infinity));
subs(f(u__b) = f(u), int(h(Q, u__b)*f(u__b), u__b = q__a .. IN));

Related

Sum Matlab from 0 to 10000 on function [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
syms k
S1 = symsum(1/((2*k)+1)^2,k,0,1000)
The result is this
59039372973827482202940226722672826425297321906316082356858983822169051832268260251807527611479190413293513875429587706186073872918905490907386679472102966658686481651660967093301512141946288248492833396616338323741632085379508599235923841007033467883638349122388806376761808189104503262045883240287482992169819848342303098664924237976221795758421152603069387903705445513260596627332283139648508194960733619500093010571517561429904500013876585156927070119332440687162376758374919870699278800835146651318465663183182583101377584105366558079836223068786457324044080570317649838092783113721959819118571747662368360095513856052974454509201490370810246175872510881504730747209788019551000695511879992198550955686739483474761130248789609061549535677663474218135370195381615899214931316241080337028498241295985409686314819267606796712968280842464845294917738460317179001491697993067157425958639996885239616893392960282441289069600101430806922004624472226999315951355963789249300352610312601262349650287009275097201871774652260892220551489305368617001974326978428202443548923140478853569492070442010110016068635424791389124439271253578545895132216218268847919848655110002938693346760862649668457282775860633067627110099340660770861888592018701206483696615682617062811616008107086256694453990688805738127607846586853460003073465075155412119309273843527076321601670400373937698518621100907936577387919537592519265365346619712200304996044229704602647674114176291753575322917531444831938509001759491229575945273985556769609288625450013634760596805884195325794441020339210402987018058377081579351119704065092777310976461961832919116412535470810011337916688085616171422473409544885864650134157327448050685723673514545806331081542320899927
It is a number in this form a/b
Why is this happening??
Do you know how to do this in octave too?
k = (0:1000);
k_sum = sum(1./((2*k)+1).^2);
disp(k_sum)
It's interesting that you jumped straight to using syms when the basic matlab functions work perfectly well for this problem. Why is that?

Is it possible to plot bars with filled pattern in Matlab [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Is it possible to plot bars with filled pattern in Matlab, like this figure?
I attempted to use applyhatch_pluscolor link however, I couldn't make it work (attempt below). Is there an easy / feasible alternative?
Test code:
bar(rand(3,4));
[im_hatch,colorlist] = applyhatch_pluscolor(gcf,'\-x.',1,[],[],150);
Then I changed the source code, from bits = hardcopy(h,'-dzbuffer',['-r' num2str(dpi)]); to bits = print(h,'-RGBImage',['-r' num2str(dpi)]);.
I got the figure below. However, this is still far away form the desired result.

How to create a a:d:b vector to create and display "sin(0), sin(pi/n), sin((2*pi)/n), . . . , sin(2*pi)]" [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have been trying for a while to get this to work but I don't seem to be getting any closer to a solution.
I'm not sure of what the pattern is and what to write for the "d" value in a:d:b
Clearly you want to start from 0 (a) and go to 2*pi (b).
Now the question comes what is your step size (d)?
From your example you can see that you are changing from 0 to pi/n.
And from pi/n to 2*pi/n.
This means your step size is d=pi/n
Once you defined your n, e.g:
n=10;
you can do the rest like this:
x=0:(pi/n):(2*pi)
y=sin(x);

In an assignment A(I) = B, the number of elements in B ....? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
When i run my program for 4 iterations there is no problem but if i run it for more than 4 i get the following error
In an assignment A(I) = B, the number of elements in B
and
I must be the same.
for the following line
Corresponding_value_of_x1(i)=x1(f==Lowest_value_of_the_objective_function(i));
Please help.
maxit=5
iga=1
x1=(6.*bin2dec(String_1))./1023
x2=(6.*bin2dec(String_2))./1023
for i=1:1:maxit
f=(x1.^2+x2-11).^2+(x1+x2.^2-7).^2;
%Displaying results from the iteration
i;
Lowest_value_of_the_objective_function(i)= min(f);
Corresponding_value_of_x1(i)=x1(f==Lowest_value_of_the_objective_function(i));
nx1=(6.*bin2dec(New_string(1)))./1023;
nx2=(6.*bin2dec(New_string(2)))./1023;
x1=nx1;
x2=nx2;
end
Corresponding_value_of_x1
It looks like you're trying to find the minimum of a vector, then the corresponding location of that value. min will do all that at once, avoiding the problem you're running into:
[Lowest_value_of_the_objective_function(i) Corresponding_value_of_x1(i)] = min(f);
Note that your error is occurring because the same minimum value is appearing more than once. This code will return the first of those minimum values. If you want different behavior, you'll have to code it.

need help for matlab [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
This figure illustrates my problem:
t (in the X1 calculation) value changes from 0 to etz. If its value reaches etz it has to start from 0 again and again.
This situation has to continue during simulation (I need a loop!). However, t is simulation time and I cannot force it to be zero. So maybe I need a parallel time to the simulation time but I don't how to create it.
Use modulo operator.
http://www.mathworks.com/help/matlab/ref/mod.html
For example:
X1 = abs((mod(t,e*tz)-e*tz/2)/(1.125*c*tz))
This part:
mod(t,e*tz)
Will be >= 0 and < e*tz and will repeat the way you want.
In the future, please provide a better title for your question. Also, providing a screen shot of your code is not the preferred way to include code.