Skip to main content
3-Newcomer
January 15, 2025
Solved

Problems with a loop

  • January 15, 2025
  • 2 replies
  • 1358 views

Hello,
I actually want to plot an if function for a certain range of numbers. I have tried to generate the values via a loop, but it just won't run.
I actually want to plot the if function for values between 0 and 1.

I'm sure it's quite simple, but somehow I'm stuck.
Best regards and many thanks

Best answer by Werner_E

It is recommended to define a function in Prime for calculating the kR values ​​and then use this for plotting or generating vectors.

Even if you seem to have already found a solution for yourself, the attached file may still contain some useful information.

 

Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------

 

Es empfiehlt sich, auch in Prime eine Funktion für die Berecnung der kR-Werte zu definieren und diese dann zum Pllotten oder für die Erzeugung von Vektoren zu verwenden.

Auch wenn du bereits selbst eine Lösung für dich gefunden zu haben scheinst, enthält die beigefügte Datei vielleicht noch die eine oder andere nützliche Information.

 

2 replies

3-Newcomer
January 15, 2025

I managed to do it myself 🙂

25-Diamond I
January 15, 2025

@MS_12003747 wrote:

I managed to do it myself 🙂


Very fine!
The file I attached earlier might still contain some useful information for you.
Your function k(x) would also be perfectly OK - the error only occurs because you are trying to evaluate it immediately after the definition (the equals sign at the end). Of course, Prime doesn't know what value it should use for the formal parameter x  😉

 

Werner_E25-Diamond IAnswer
25-Diamond I
January 15, 2025

It is recommended to define a function in Prime for calculating the kR values ​​and then use this for plotting or generating vectors.

Even if you seem to have already found a solution for yourself, the attached file may still contain some useful information.

 

Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------

 

Es empfiehlt sich, auch in Prime eine Funktion für die Berecnung der kR-Werte zu definieren und diese dann zum Pllotten oder für die Erzeugung von Vektoren zu verwenden.

Auch wenn du bereits selbst eine Lösung für dich gefunden zu haben scheinst, enthält die beigefügte Datei vielleicht noch die eine oder andere nützliche Information.

 

3-Newcomer
January 15, 2025

We don't have 10.0 at the UniBw yet. I hope we get it soon. So I can't open the file.

But thank you very much anyway!

 

Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------

 

Wir haben an der UniBw noch kein 10.0. Ich hoffe wir bekommen es jetzt schnell. Ich kann die Datei daher nicht öffnen.

Aber trotzdem vielen Dank!

3-Newcomer
January 15, 2025

Awesome! Thank you very much!

 

Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------

 

Mega! Vielen Dank!