plot - Mathematica 1/0 Infinite expression while plotting -


j = 0.05; b = 0.02; tload[t_] := 0.0; r1 = 2; \[alpha] = 30*\[pi]/180; d = 0.05; g = 0.001; nturns = 200; \[mu]0 = 4*\[pi]*10^(-7); r = 0.03; lm = 0.02; d = 0.1; w = sqrt[2*r^2 - 2*r^2*cos[2*a]]; rgmax = g/(\[mu]0*r*d); rm = lm/(\[mu]0*w*d); square[x_, x1_, x2_] := unitstep[x - x1]*(1 - unitstep[x - x2]) rg[\[theta]_] :=   rgmax/((2 \[alpha] - mod[\[theta][t], \[pi]])*      square[mod[\[theta][t], \[pi]], -2 \[alpha],        2 \[alpha]] + (2 \[alpha] - mod[-\[theta][t], \[pi]])*      square[mod[-\[theta][t], \[pi]], -2 \[alpha], 2 \[alpha]]) l[\[theta]_] :=   nturns^2/(   2*rg[\[theta]] +     rm) *(square[mod[\[theta][t], \[pi]], -2 \[alpha], 2 \[alpha]] +      square[mod[-\[theta][t], \[pi]], -2 \[alpha], 2 \[alpha]]) plot[l[\[theta]], {\[theta][t], -8 \[alpha], 8 \[alpha]},   plotrange -> all] 

i'm sorry not paste mathematica can show (newbie here). however, tried several solutions rid of 1/0 inf expression of l[theta] didn't it.

please, copy , paste notebook , run it.

i multiply l[theta] square function make undefined areas equal zero(f.e 2a, pi-2a should 0 other intervals) did not work.

how can identify function properly?

thanks in advance.

this?

j=0.05; b=0.02; tload[t_]:=0.0; r1=2; \[alpha]=30*\[pi]/180; d=0.05; g=0.001; nturns=200; \[mu]0=4*\[pi]*10^-7; r=0.03; lm=0.02; d=0.1; w=sqrt[2*r^2-2*r^2*cos[2*\[alpha]]]; rgmax=g/(\[mu]0*r*d); rm=lm/(\[mu]0*w*d); square[x_, x1_, x2_]:=unitstep[x-x1]*(1-unitstep[x-x2]); rg[\[theta]_]:=rgmax/((2 \[alpha]-mod[\[theta],\[pi]])*square[mod[\[theta],   \[pi]],-2 \[alpha], 2 \[alpha]] +(2 \[alpha]-mod[-\[theta],\[pi]])*   square[mod[-\[theta],\[pi]],-2 \[alpha], 2 \[alpha]]); l[\[theta]_] := nturns^2/(2*rg[\[theta]]+rm)*(square[mod[\[theta],\[pi]],   -2 \[alpha],2 \[alpha]]+square[mod[-\[theta],\[pi]],-2 \[alpha], 2 \[alpha]]);  plot[l[\[theta]], {\[theta],-8 \[alpha],8 \[alpha]}, plotrange->all, plotpoints->200] 

the plot

all did fix versus alpha , theta[t] versus theta confusion.

theta variable , theta[t] function. there complicated explanation of this, not same thing , may mean different things mathematica. further stray conventional way of doing things in mathematica more confusing holes can fall no way of understanding why isn't doing expect to.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -