Course Solutions Uncategorized (Solved) : Matlab Want Plot Function 1 10000 X Values Function Y Values Call Function Use Y Values 1 Q30984960 . . . .

(Solved) : Matlab Want Plot Function 1 10000 X Values Function Y Values Call Function Use Y Values 1 Q30984960 . . . .

 

MATLAB:

I want to plot a function from 1:10000 as x values and aFUNCTION as y values, How do I call the function to use as y valuesfrom 1:10000 input?

Function:

function [N, mx] = collatz(x)

X = x;
N = 0;
mx = x;
while X ~= 1
if mod(X,2) % X is odd
X = 3*X+1;
else
X = X/2;
end
N = N+1;
if X > mx
mx = X;
end
end

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Page 1 2 Design Problem Combination Locks Used Guard Personal Belongings Figure 1 Shows Me Q37155808 . . . .(Solved) : Page 1 2 Design Problem Combination Locks Used Guard Personal Belongings Figure 1 Shows Me Q37155808 . . . .

<p><img alt="Page 1 of 2 Design Problem Combination locks are used to guard personal belongings. Figure 1 shows a mechanical single-dial p" src="https://media.cheggcdn.com/media%2Ff4f%2Ff4f491ef-b6d5-419e-952a-6dc60f485ca4%2FphpY1nwKx.png" style="height:1024px;width:576px;" aria-describedby="d3f"/></p>Page 1 of 2 Design Problem