Can someone help me to solve it by Matlab?

%17
n=[10 100 1000 10000];
for N=n
S=0;
for k=N:-1:1
S=(1/(k*k))+S;
end
result=(6*S)^2;
fprintf('Calculated result for N =%d:
%f\n',N,result)
end
%%%%18
n=[10 100 1000 10000];
for N=n
S=0;
for k=N:-1:1
if mod(k,2)==1
S=(1/(k*k))+S;
end
end
result=(6*S)^2;
fprintf('Calculated result(odd numbers) for N
=%d: %f\n',N,result)
end

Can someone help me to solve it by Matlab? 17. Write a script which does the...
Can someone help me to solve it by Matlab?
Use the Boffon's Needle experiment to approximate pi on the following scenario. A dart is thrown at a square with sidelength 2. A circle is inscribe within the square. First deduce what the probability of the dart landing inside or on the edge of the circle is. Now write a Matlab script which approximates by simulating many dart throws. Run your script when n-10000, 100000, 1000000, 10000000, and 100000000 times, and...
Write a MATLAB script, which asks the user to input the angle xd (in deg) and then approximates sine of the angle using the first 5 terms of Taylor series as follows: n+12n-1 sin n-1 (2n-1)! 1 Note that x in Taylor's equation is in radian, so make sure to do the conversion first Start with defining the vector n=1:5 and then use element-wise operation and basic MATLAB commands to calculate the summation. To calculate the factorial of any number,...
How to solve principle component analysis with matlab can someone help me? Thx in advance
Can someone please show me how to solve this through MATLAB? I'm
not sure as to how to begin. I need the MATLAB code in which the
arrays are clearly shown. My professor suggested using V=inv(A)*I.
Apply nodal analysis in order to find the voltages at each node.
Thanks!
2k 2mA 12k 6k 3k 6k lmA
Hello, I need a matlab script which can give me the poles of this transfer function. G(s)= (10*k)/(s^2+10s+9+10k) However, I need the poles for different values of k where K goes from 0 to 8.45. So for example: K = 1, poles are ... K = 1.2 poles are .... ... K = 8 poles are ... You can increment the k by .1 or whatever you see fit.
To Be Done Only in MatLab
Please use the format provided:
Integrals can be computed numerically using the Reimann sum definition. ゞrxldr ~-ofu.h where h = 부 when N is large, x, is the discretized points between a and b. For example the integral of f(x)2 for 03x3 2 is done by N-100; a-0 b 2; h -(b-a)/N; x-a:h:b; sum(f*h); F = The resulting value is 2.7068, compared to the exact solution 2.6667. Use the above technique to compute the...
Can someone help me figure out how to write code on Matlab for
either of these two questions? My biggest problem is working with
the large factorials which Matlab can't seem to handle
1. Write a code to calculate nas a function of ga, when NA l300, 600, 3000, 6000, NB (200, 400, 2000, 4000), and g 100, plot them and try to find some tendency when N increases (hint: 4 plots). 2. Write a code to calculate the probability...
can anyone help me solve these on MATLAB?? please
intro to programming and computation
3. 50 points - The purpose of this question is to test your ability to write for loops, so you won't get points if your answer works without using for loop. A vector is given by V - (5. 17. -3,8,0,-7. 12, 15, 20. -6, 6, 4.-7.16). Write a program as a script file that doubles the elements that are positive and raise to the power...
Can someone help me to solve it by Matlab?
7. Create a 5 row, 8 col matrix called mymat w ith random integers betwee n and including 70 and 90 Create a matrix from mymat called newmat whose entries consist of those entries which are both in the second and third rows, but also in the 4th through 6th columns 8. 9 What command would you type to list just the 4th row, 6th column entry of mymat? 1o. Crete...
Can someone help me to solve it by Matlab?
) Many dice games use two 6-sided dice, where each side faces up with equal probability, each turn consists of rolling both dice, and where the SUM of the two dice values is the outcome used in the game. Figure out how to simulate 3600 such die rolls, and then to make a nicely designed histogram displaying the outcomes as a PERCENT of the total rolls