• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

Tag Archives: Piecewise

Piecewise function

July 7, 2019   BI News and Info
 Piecewise function

I have the differential equation
w'(t)= 1/J*(B/2(F1-F2)-Bw) if turning=true
0 if turning=false

and I want to solve it.
I have written

w[t_] = Piecewise[{{1/J(B/2(F1(t)-F2(t))-Bw(t)), turning=1}, {0, turning=0}]
D[w[t], t]

but I think it’s not correct. Could anyone help me please???

1 Answer

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Read More

InterpolatingFunction::dmval error in the Piecewise function with an interpolation funcion included

January 22, 2018   BI News and Info
 InterpolatingFunction::dmval error in the Piecewise function with an interpolation funcion included

I have a set of data, first I deal the data with an Interpolation function.

excitef1 = Interpolation[ps1]

Then I use a Piecewise function to expand the range of the function

excite1 = Piecewise[{{excitef1[r], 4.97 <= r <= 22}, {0, r > 22}}]

The Piecewise function is then used to solve a differential equation

    exciteshiftfunction = 
  ParallelTable[NDSolveValue[{w1'[r] + (20/10*mass*excite1 + i*(i + 1)/r^2)/wave
*(Sin[wave*r + w1[r]])^2 == 0, w1[auo] == -wave*auo}, 
        w1, {r, 5, 10000000}, MaxSteps -> Infinity], {i, 0, 120}];

where mass, wave, auo are constants.

but the reslut returns an error warning:

InterpolatingFunction::dmval: Input value {1035.17} lies outside the range of data in the interpolating function. Extrapolation will be used.

I tried many methods to solve this error, but only get similar error warnings or software crashs due to insufficient system memory.

I appreciate any help, best regards sincerely.

Ps: the data interpolated is attached below.

    {{4.96735, 0.00729014}, {5.02197, 0.00714075}, {5.09024, 
  0.00701852}, {5.19949, 0.00686913}, {5.32236, 0.00673333}, {5.47255,
   0.0066111}, {5.62275, 0.00650245}, {5.77295, 0.00639381}, {5.9095, 
  0.00627158}, {6.05969, 0.00614936}, {6.18258, 0.00601355}, {6.33278,
   0.00586416}, {6.51028, 0.00566045}, {6.63317, 0.00547032}, {6.7697,
   0.00528019}, {6.87893, 0.00511722}, {7.01548, 
  0.00489993}, {7.15201, 0.0047098}, {7.26126, 0.00453325}, {7.35682, 
  0.0043567}, {7.46607, 0.00418015}, {7.54798, 0.00404434}, {7.67087, 
  0.00386779}, {7.79376, 0.00367766}, {7.90299, 0.00347395}, {8.01222,
   0.00331098}, {8.1078, 0.00316159}, {8.24435, 0.0029443}, {8.39454, 
  0.00275417}, {8.50377, 0.0025912}, {8.59935, 0.00246898}, {8.70858, 
  0.00230601}, {8.7905, 0.00221094}, {8.89974, 0.00208872}, {9.02263, 
  0.00193933}, {9.17283, 0.00178994}, {9.30936, 0.00164055}, {9.44589,
   0.00150474}, {9.62342, 0.00135536}, {9.77361, 
  0.00126029}, {9.93745, 0.0011109}, {10.1286, 0.00100226}, {10.2788, 
  0.000880031}, {10.4836, 0.000771386}, {10.6475, 
  0.000703482}, {10.8386, 0.000621997}, {10.9888, 
  0.000554094}, {11.1663, 0.00048619}, {11.3575, 
  0.000431867}, {11.5486, 0.000363964}, {11.7398, 
  0.000336802}, {11.9446, 0.00029606}, {12.1221, 
  0.000255318}, {12.286, 0.000214576}, {12.4498, 0.000200995}, {12.6, 
  0.000160253}, {12.7639, 0.000146672}, {12.955, 
  0.000133091}, {13.0506, 0.000133091}, {13.2281, 
  0.00010593}, {13.3919, 0.00010593}, {13.5694, 
  0.000092349}, {13.7879, 0.0000651875}, {13.9791, 
  0.0000651875}, {14.1975, 0.000038026}, {14.4297, 
  0.000038026}, {14.7027, 0.000038026}, {15.0304, 
  0.0000244453}, {15.2625, 0.0000244453}, {15.5356, 
  0.0000244453}, {15.8224, 0.0000108646}, {15.9726, 
  0.0000108646}, {16.2047, 0.0000108646}, {16.4505, 
  0.0000244453}, {16.6689, 0.0000108646}, {16.8191, 0.}, {17.2424, 
  0.}, {17.5428, 0.}, {17.9661, 0.}, {18.3484, 0.}, {18.8809, 
  0.}, {19.2905, 0.}, {19.6728, 0.}, {20.0415, 0.}, {20.4375, 
  0.}, {20.8061, 0.}, {21.1748, 0.}, {21.3659, 0.}, {21.7619, 
  0.}, {22.1306, 0.}, {22.3217, 0.}}

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Read More

Piecewise function extraction

September 17, 2016   BI News and Info
 Piecewise function extraction

In Mathematica everything is specified via patterns. So are, of course, Piecewise functions. To obtain a standardized form for nested Piecewise functions you were right to apply PiecewiseExpand first. So let’s take a look at an example of a nested Piecewise function:

(*definition*)
pw = Piecewise[{{g[x],x > 5}, {Piecewise[{{h1[x],x < 1}, 
{h2[x],x > 2}}, h3[x]], x < 3}}, f[x]];
(*expansion*)
pwe = PiecewiseExpand[pw];

Remember my remark about patterns before. Let’s take a look at the underlying pattern (form) of the expanded Piecewise function:

pwe // FullForm

This gives you a clue on how to extract all the functions via using the Part operator, here is one possibility to do it:

Flatten[{pwe[[1, ;; , 1]], pwe[[2]]}]

{f[x], g[x], h1[x], h2[x], h3[x]}

Have fun playing around with this.

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Read More
  • Recent Posts

    • Database version control: Getting started with Flyway
    • Support CRM with New Dynamics 365 Field Service Mobile App
    • 6 Strategies for Achieving Your Business Goals in the New Year
    • Researchers propose using the game Overcooked to benchmark collaborative AI systems
    • Oracle Launches Version 21c
  • Categories

  • Archives

    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2021 Business Intelligence Info
Power BI Training | G Com Solutions Limited