Answered
Adding new circle to plot at constant frequency
You should put your circle plotting code in a for loop and iterate from 0 to |floor(i/20)| (or the reverse). function h = c...

9 years ago | 0

| accepted

Answered
How to read a text file and only keep certain numbers?
Once you have the data in MATLAB ( |fileread| will do the trick) you can use regular expressions to find your data. Use MATLAB's...

9 years ago | 0

Answered
How can I add a patch which lies underneath an existing line?
You can reorder the |Children| property of the axes on which you have drawn you line and patch. For example, in my application I...

9 years ago | 1

Answered
How do can I check whether 2 columns in an array have equal values in a row?
Your |if| statement is examining the entire column because you use |:| in your indexing expression instead of a loop index, but ...

9 years ago | 0

| accepted

Answered
How do i bin large data sets?
It looks like you have an extra comma after |length|, which would cause the error you are seeing.

9 years ago | 0

Answered
Variate color depending on the Y-value in plot
Following this post on <http://undocumentedmatlab.com/blog/plot-line-transparency-and-color-gradient Undocumented MATLAB> you co...

9 years ago | 3

Answered
How to reset ylim from figure window on a two axis plot?
You could use the |linkaxes| function on your two axes handles. Then MATLAB will update whichever you didn't update to match the...

9 years ago | 0

Answered
How to hold the output for 5 seconds if it is TRUE and make it FALSE immediately?
It would be helpful to know what kind of model this is. Continuous or discreet? variable or fixed step size? In general, I re...

9 years ago | 0

| accepted

Answered
UI without GUIDE. The problem with edit element
You should be passing into the callback function the handle to your edit box. For example ... ,'Callback',{@pushbutton_call...

9 years ago | 0

| accepted

Answered
Plotting waves in 2d
Your call to |surf| only references |a| and is not affected by your second wave in |b|. Maybe you meant to use something like ...

9 years ago | 0

Question


Why does Embedded Coder preserve my tunable parameter inside TAN but not TAND?
I am generating code from a Simulink model in R2015a using the Embedded Coder target. I have a workspace variable |a| that is us...

9 years ago | 0 answers | 0

0

answers

Answered
Code Generation (Embedded Coder) The function has no return value?
By default, the outputs are assigned via the pointers that are passed into the function. If your model outputs a, you should see...

9 years ago | 1

Answered
GUI Plot that has an interactive slider to change input parameter while running constantly
You can add a listener to the |Value| of the slider to trigger a callback while the slider is being dragged rather than just whe...

9 years ago | 0

| accepted

Answered
Repetition of repeated rows
There are a few ways you could do this. The most straightforward is with |hist|. Use |hist| to count the instances of your data ...

9 years ago | 0

Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

9 years ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

9 years ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

9 years ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

9 years ago

Answered
How to write a table to a user specified excel file name/directory?
I believe you want the function |uiputfile|. It will open a dialog in which the user can select a path and name for a new file. ...

9 years ago | 0

| accepted

Answered
Controlling current axes within programmatic UI (GUI layout toolbox)
|gca| calls |gcf| and checks the |'CurrentAxis'| property of the result. Because you turned you figure's |'HandleVisibility'| to...

9 years ago | 1

| accepted

Answered
Im unable to get the coordinate locations of a node in a plotted graph....like if the node(124) is at the location (1,19) which is the x and y value of that node how do i get the x and y values for every node??
If you provide additional details on how you generated that plot, this community might be better able to help you. As a starting...

9 years ago | 0

Answered
How to use a loop to add a value at an increasing interval
If I gather correctly what you are trying to do, you don't need the loop at all. You can determine the total cost for any number...

9 years ago | 0

| accepted

Answered
Making interpolate of 3 set of data
The function |interp1| can interpolate over multiple columns at a time. Concatenate your column vectors and call |interp1| one t...

9 years ago | 0

Answered
How to align the two axes in one figure
In addition to |plotyy| as mentioned in the comments, I sometimes use (in R2015a) the following command to add a listener to my ...

9 years ago | 1

Answered
How can I get the first two non-zero values of a timeseries vector?
By default, the Find block uses zero-based-indexing (first index is 0), but the Selector block uses one-based-indexing (first in...

9 years ago | 0

Answered
How do I obtain a data point at a certain time from timeseries based on a condition (simulink and matlab)?
If I understand your question correctly, you are looking for an Enabled Subsystem. Look for either the Enabled Subsystem or the ...

9 years ago | 0

Answered
I am trying to write an array to a .dat file which in turn is being as an input file for a certain executable file. I would like matlab to be able to run the .exe file along with the input files and return the output from the executable.
I think you are looking for the |system| command. Use it to call your executable as though you were calling it from the command ...

9 years ago | 0

Answered
Read specific columns of a text file
I recommend you check out |datastore|. docsearch Read and Analyze Large Tabular Text File You can use its |SelectedVaria...

9 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals. Error in erlang3 (line 4) erlang = lambda*exp(-1*lambda*xk)*(lambda*xk)^2/2;
Is there any chance you defined a variable |exp| before executing this code? My best guess (given the limited information provid...

9 years ago | 0

Answered
Loading very large CSV files (~20GB)
You should look into |datastore| and |mapreduce|. They were introduced in R2014b and are intended for handling large data sets. ...

9 years ago | 0

| accepted

Load more