<div dir="ltr"><span style="font-family:Calibri,sans-serif;font-size:14.6667px">type = "l,"</span> <div>Tem uma vírgula a mais.</div><div><br></div><div> <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qui., 21 de mai. de 2020 às 17:23, Gilenio Borges Fernandes por (R-br) <<a href="mailto:r-br@listas.c3sl.ufpr.br">r-br@listas.c3sl.ufpr.br</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Prezados(as)<div><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">No CMR seguinte, esperava 255 linhas no matplot. Está
plotando apenas uma linha e a seguinte mensagem:</p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:11.25pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Lucida Console";color:rgb(197,6,11)">Error in plot.xy(xy.coords(x, y), type = type, ...)
: </span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:11.25pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;word-break:break-all;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:10pt;font-family:"Lucida Console";color:rgb(197,6,11)"> </span><span style="font-size:10pt;font-family:"Lucida Console";color:rgb(197,6,11)">tipo de gráfico inválido ','</span><span style="font-size:10pt;font-family:"Lucida Console";color:black"></span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Alguma ideia/sugestão?</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">set.seed(1000)</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">u = 0.25</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">dp =
0.15</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">periodo
= 1:256</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">n_sim = 50</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">total_sim = matrix(0, nrow = 256, ncol = n_sim)</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">p_inicial = 10</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">for(j in 1:n_sim) {</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> aux = 2</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> p = p_inicial</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> preco = c(p)</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> <span lang="EN-US">dist = rnorm(255, 0, 1)</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> for (i in dist)</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> {</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> P = p+p*(u/255 + dp/sqrt(255)*i)</span></p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span>preco[aux] = P</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> p = P</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> aux = aux +1</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> }</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> total_sim[,j] =
preco</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">}</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">matplot(periodo,total_sim, main = "Simulacao Monte
Carlo", xlab= "Tempo", ylab = "Valor", type =
"l,",</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> col =
1:n_sim)</p>
<p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"> </p><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Gilênio Borges Fernandes</div><div dir="ltr">Professor substituto da UFBA (03/2019 a ...)</div><div dir="ltr">Professor substituto da UEFS/DEXA (01/2018 a 03/2019)</div><div dir="ltr">Professor substituto Adjunto A (UFBA - 03/2015 a 03/2017)</div><div dir="ltr">Professor Associado IV (Aposentado)</div><div dir="ltr">Universidade Federal da Bahia</div><div dir="ltr">Instituto de Matemática e Estatística</div><div dir="ltr">Departamento de Estatística</div><div dir="ltr">Av. Adhemar de Barros, s/n – Ondina.</div><div dir="ltr">40.170-110 - Salvador - BA, Brasil</div><div dir="ltr">Tel.: (071)3283-6340/6341/6337 Fax: (071)3283-6336</div><div dir="ltr">ORCID: <a href="http://orcid.org/0000-0002-2364-0954" target="_blank">http://orcid.org/0000-0002-2364-0954</a></div><div dir="ltr">Lattes: <a href="http://lattes.cnpq.br/6764860618464860" target="_blank">http://lattes.cnpq.br/6764860618464860</a></div><div dir="ltr"><span style="font-size:11pt;line-height:115%;font-family:Calibri,sans-serif"><a href="https://gilenio.github.io/" target="_blank">https://gilenio.github.io/</a></span><br></div><div dir="ltr">Skype: gilenio.fernandes</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" rel="noreferrer" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" rel="noreferrer" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div style="text-align:left"><b><i><font face="verdana, sans-serif"><font color="#000099"> </font><font color="#006600"> <u><font size="4">Wecsley O. Prates</font></u></font></font></i></b></div><div style="text-align:left"><b><i><font face="verdana, sans-serif"><font color="#006600"><u><font size="4"><br></font></u></font></font></i></b></div><div style="text-align:left"><b><i><font face="verdana, sans-serif" color="#006600"><u>Professor Adjunto do Departamento de Estatística da UFBA<br></u></font></i></b></div><div style="text-align:left"><span style="color:rgb(0,102,0);font-family:verdana,sans-serif"> </span></div>
<div><font color="#006600"><b><i></i></b> </font></div></div></div></div>