Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Updating graph edges with slider value

Subject: Updating graph edges with slider value

From: Kelsey

Date: 14 Jun, 2011 19:42:02

Message: 1 of 1

I have MATLAB code that plots 3d position data and calculates and plots edges between neighboring nodes based on a user input distance. (If a node is within a certain distance of another node, an edge is plotted.) Now, I'm trying to use a slider so that the user can change that input distance value and see the resulting change in the graph. I've been messing around for quite a long time using get and set in both the function that initially plots the data, and the slider callback function, but I can't successfully get the graph to update. I can get the graph to use the first value from the slider as the input distance, but when I drag the slider, nothing happens. Could someone out there with more MATLAB experience explain how to use the get and set functions for my problem?

Thanks very much!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us