MATLAB: Plz. help me TT I want write if(((mp(1)>0)&(mp(1)<140))&((mp(2)>0)&(mp(2)<140))) ifif statementMATLAB 0<mp(1)<140 + 0<mp(2)<140 that write to if(here) plz TT if(((mp(1)>0)&(mp(1)<140))&((mp(2)>0)&(mp(2)<140))) thats incorrect T.T Best Answer if (mp(1) > 0) && (mp(1) < 140) && (mp(2) > 0) && (mp(2) < 140) ...endBest wishesTorsten. Related SolutionsMATLAB: Improve this function in terms of speed t = head_rcv(head_rcv ~= 0);ruffled_head = t(randi(length(t))); MATLAB: Hi, My histogram is not showing what I would like can I get some help please The problem is that you are not storing the answers/toss.A=input('How many tossing would you like to do? ')x= rand(A,1);toss = nan(A,1);for i=1:length(x) if x(i)<0.5 toss(i) = -1; %Head elseif x(i)>=0.5 toss(i) = 1; %Tail else disp('Error...') endendhistogram(toss)Edit: If you want it more neatA=input('How many tossing would you like to do? ')x= rand(A,1);above = x < 0.5;x(above)=-1;x(~above)=1;histogram(toss) Related QuestionUsing mp3write
Best Answer