Skip to main content
19-Tanzanite
May 31, 2024
Solved

How to show all values of this variable?

  • May 31, 2024
  • 2 replies
  • 3233 views

Hi,

How to show all the values of ic1(t). If I put iC1(1ms) for example the calculation is done, but I want to have a vector of all the values of iC1(t). Is it possible?

Cornel_0-1717153852207.png

Cornel_1-1717153966760.png

 

Best answer by Werner_E

Here you are:

Werner_E_0-1717194971745.png

As you can see the evaluation fails for the first and the last value of t.

You are using numerical differentiation for a function derived with "odesolve" for arguments from 0s to t.end

The algorithm used by Prime for this seems to use the function values ​​of arguments before and after the point in question. But in the result of a 'function' determined by "odesolve" there are no function values ​​for arguments before the first initial value of t (0 s) or after the last value (t.end). So the numerical derivative can't be calculated for these end values.

The evaluation should be possible without this problem using the function i.C1(t), which, as I have shown, is determined together with the others in the solution block.

2 replies

15-Moonstone
May 31, 2024

A linear inhomogeneous ordinary differential equation of second order and its initial values ​​are given. Its closed-form solution is easily possible if the inhomogeneity vE(t) is given. Please state this. I will then try to answer in MC14.

Werner_E25-Diamond IAnswer
25-Diamond I
May 31, 2024

Here you are:

Werner_E_0-1717194971745.png

As you can see the evaluation fails for the first and the last value of t.

You are using numerical differentiation for a function derived with "odesolve" for arguments from 0s to t.end

The algorithm used by Prime for this seems to use the function values ​​of arguments before and after the point in question. But in the result of a 'function' determined by "odesolve" there are no function values ​​for arguments before the first initial value of t (0 s) or after the last value (t.end). So the numerical derivative can't be calculated for these end values.

The evaluation should be possible without this problem using the function i.C1(t), which, as I have shown, is determined together with the others in the solution block.

15-Moonstone
June 1, 2024

I would like to complete this task in the classic way. To do this, I need the function n vE(t) so that I can use it in MC14. There is a sentimental reason for my request: I remember my student days when easy exercises of this kind were stressful.

25-Diamond I
June 1, 2024

@AlfredFlaßhaar wrote:

I would like to complete this task in the classic way. To do this, I need the function n vE(t) so that I can use it in MC14. There is a sentimental reason for my request: I remember my student days when easy exercises of this kind were stressful.


vE(t) is a simple square wave signal

Werner_E_0-1717230570785.png

similar to the one posted here  Why these 2 function implementation of square wave...

You also may use one of the alternatives I provided there (Tf = 1 ms,  Vmax = 10 V) or if its more convenient for you, you may also use a definition using the Heaviside function:

Werner_E_1-1717231381421.png

Werner_E_2-1717231635894.png

 

But I guess that the periodic nature of the function vE will make deriving a closed form symbolic solution using the "classic way' to solve this 'easy exercise' somewhat difficult.

Good luck!