Data range issues

Data range issues - Can't get it to work correctly - Poruke

#1 Objavljeno: 27. 5. 2019. 20:56:17
Graeme

Graeme

0 svidjanja u 3 postova.

Grupa: User

I'm having issues with using variables, I have a bunch of equations that have a single variable (end goal is to plot this) and when I use variable functions/matrices they make the outputs wrong somehow.
I have no issues when setting x to be a single number, but when I set x to a range of numbers the outputs go wrong.


https://imgur.com/a/B4Y8Sod


https://imgur.com/a/Qk3IxY8

Am I just doing it wrong?
#2 Objavljeno: 27. 5. 2019. 21:49:02
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

I'm having issues with using variables, I have a bunch of equations that have a single variable (end goal is to plot this) and when I use variable functions/matrices they make the outputs wrong somehow.
I have no issues when setting x to be a single number, but when I set x to a range of numbers the outputs go wrong.


Please: attach the Smath work sheet to see what you may be missing.

#3 Objavljeno: 27. 5. 2019. 22:37:14
Graeme

Graeme

0 svidjanja u 3 postova.

Grupa: User

Smath Data Ranges.sm (694,13 KiB) preuzeto 1280 put(ova).

Here is the smath file, the important parts are at the bottom.
#4 Objavljeno: 28. 5. 2019. 05:09:27
sergio

sergio

127 svidjanja u 342 postova.

Grupa: User

you have to use the vectorize function
vectorize28-05-19.png

sergio
1 korisnika je svidelo ovu objavu
frapuano 28. 5. 2019. 06:56:00
#5 Objavljeno: 28. 5. 2019. 09:33:46
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

Here is the smath file, the important parts are at the bottom.


...added at the end of your document.

draw.PNG

Smath Data Ranges.sm (700,77 KiB) preuzeto 1273 put(ova).
#6 Objavljeno: 28. 5. 2019. 23:26:56
Graeme

Graeme

0 svidjanja u 3 postova.

Grupa: User

Thanks for your help, the vectors did the trick (although I don't understand why they have to be vectors).

Here is the end result,

Capture1.GIF

Capture2.GIF
#7 Objavljeno: 29. 5. 2019. 05:41:53
sergio

sergio

127 svidjanja u 342 postova.

Grupa: User

Obviously it's not a trick.
That way you ask to perform the evaluation element by element contained in the vector.
In the wrong way you used, perform the evaluation in a matrix sense (following the rules on matrix operations) because x1 is a matrix (vector).

sergio
#8 Objavljeno: 29. 5. 2019. 09:52:57
Вячеслав Мезенцев

Вячеслав Мезенцев

1.558 svidjanja u 1.868 postova.

Grupa: Moderator

Another form. The arrow is a vector summation.

2019-05-29_17-53-49.png
Russia ☭ forever, Viacheslav N. Mezentsev
  • Novi postovi
  • Nema novih postova