MATLAB Learning Curve of Wolfram Alpha or Matlab

AI Thread Summary
The discussion revolves around creating a heat map to determine the geographical center of multiple points using various programming tools. The original poster expresses a desire to visualize data graphically and considers using Pythagorean calculations for distance measurement. Suggestions include using Freemat, a free alternative to Matlab, and Python's matplotlib for plotting. There is also mention of using Dynamic HTML and JavaScript for a custom solution, although some participants note that these technologies are becoming outdated. The conversation touches on the balance between learning to code and utilizing existing applications that simplify the process. Participants share experiences with personal projects, emphasizing the importance of self-contained solutions to avoid infrastructure decay over time. Overall, the thread highlights the exploration of different tools and methods for data visualization while acknowledging the challenges of keeping projects relevant in a rapidly evolving tech landscape.
DaveC426913
Gold Member
Messages
23,869
Reaction score
7,905
TL;DR Summary
I'm always wanting to plot simple graphs, what are my options?
I should probably get one or two of these under my belt.

My current need is to plot a ... I guess it's a heat map.

I've got a map of my local area and I want to determine the geographical centre of a number of points (say, seven). So, for every xy "cell" on the map, I'll use pythagoras to determine the "as the crow flies" distance from each of the start points, add them up and give them a colour.

I'm hoping for something vaguely like this:
HoloviewsOutput.png

(I may be overengineering this - but I do like graphical renders. I'm sure there's a much more expedient way to find the centre of n points, using just geometry.)
 
Physics news on Phys.org
Cool. My go-to would be Dynamic HTML using Javascript such as jQuery. Maybe freemat will provide the infrastructure for me that I'd have to otherewise make.
 
*sigh*
What's the point in learning to do something if someone's already produced an app that does it with a click?

https://www.geomidpoint.com/

1639709790420.png

Really wanted to see that heat map tho... :sorry:
 
With conditional formatting in LibreOffice and two different color scales:

distances.png


distances2.png
Note: I scaled longitude with cos(43 degrees) to get a more realistic latitude/"longitude" distance ratio in the calculations but didn't pay too much attention to getting that right for the large table.
 
Writing code to compete with an existing app is still a lot of fun. One has to reverse engineer the algorithms used and then make your app more suited to what you want which in turn make it a better app worthy of becoming publicly available via Github.
 
DaveC426913 said:
Summary:: I'm always wanting to plot simple graphs, what are my options?
DaveC426913 said:
*sigh*
What's the point in learning to do something if someone's already produced an app that does it with a click?
Well, this very specific app will not give you any progress in the general goal of being able to plot simple graphs.
 
jedishrfu said:
Try freemat before you jump into get Matlab. It’s free and implements most of Matlab s core functionality For free. Free free free!

http://freemat.sourceforge.net/
Freemat seems not to be very active anymore? Why not use Octave instead? (Or indeed scipy, numpy, matplotlib from Python)
 
Freemat is the smaller of the two as a single executable And seems to mimic Matlab more closely than Octave.
 
  • Like
Likes Arjan82
  • #10
Huh. Well that wasn't nearly as painful as I thought. Took me all of 3 hours in Dynamic HTML and Vanilla JavaScript. Didn't need a library after all (only 44 lines of code).

This is rough and crude and I can add a lot of bells and whistles to it, including generalizing it to accept any number of "houses", but it is operating at full capacity.

1639857707959.png


It is, alas, as-the-crow-flies, so does not account for roads or speeds - just straight line-of-sight distance.

(Note: the point in the far east is actually two points - two people carpooling from the same location. This skews the centre a little east.)
 
Last edited:
  • Like
Likes mfb
  • #11
DaveC426913 said:
Cool. My go-to would be Dynamic HTML using Javascript such as jQuery.
I see you have a solution, but for future use I recommend Plotly. It is not as comprehensive as Matlab or matplotlib, but it does do heat maps.

It is 2021, nobody uses the term 'Dynamic HTML' any more, or jQuery :-p
 
Last edited:
  • #12
pbuk said:
It is 2021, nobody uses the term 'Dynamic HTML' any more, or jQuery :-p
Nobody uses vanilla JS anymore.
 
  • Like
Likes pbuk
  • #13
DaveC426913 said:
Nobody uses vanilla JS anymore.
If I had a dollar for every hour I spent working on things that "nobody uses anymore", I would ...
Oh wait, I do. I made a whole career out of it. ;-)
 
  • Like
Likes suremarc and DaveC426913
  • #14
FactChecker said:
If I had a dollar for every hour I spent working on things that "nobody uses anymore", I would ...
Oh wait, I do. I made a whole career out of it. ;-)
For my personal projects, I like self-contained solutions. I find they last longer before rotting.

I have some cool projects - one of which drew in 14,000 users and generated more than a million data points - but, because it relied on a database, the infrastructure rotted as I moved from web service to web service. And now it lies broken until I feel like refurbishing it.
 
  • Like
  • Love
Likes mfb, pbuk and FactChecker
  • #15
FactChecker said:
If I had a dollar for every hour I spent working on things that "nobody uses anymore", I would ...
Oh wait, I do. I made a whole career out of it. ;-)

I would definitely ask for a raise if I were you 😂
 
  • Like
  • Haha
Likes suremarc, mfb and FactChecker
  • #16
Arjan82 said:
I would definitely ask for a raise if I were you 😂
Can I have that in writing?
 
  • Haha
  • Like
Likes suremarc and Arjan82
  • #17
DaveC426913 said:
For my personal projects, I like self-contained solutions. I find they last longer before rotting.

I have some cool projects - one of which drew in 14,000 users and generated more than a million data points - but, because it relied on a database, the infrastructure rotted as I moved from web service to web service. And now it lies broken until I feel like refurbishing it.
Yes. That is one of the great pleasures of being able to select the language and tools that you want to use. It's fun instead of work.
 
  • #18
DaveC426913 said:
For my personal projects, I like self-contained solutions. I find they last longer before rotting.
A good maxim.
 

Similar threads

Replies
0
Views
834
Replies
0
Views
355
Replies
15
Views
4K
Replies
1
Views
9K
Replies
28
Views
6K
4
Replies
175
Views
25K
Replies
1
Views
2K
Back
Top