Answered
Matlab, can you create a separate font size for the x tick mark label and y tick mark label?
In R2016a (and probably anything R2014b or after), you can set different font sizes for each axis using ax = gca; ax.XAx...

meer dan 8 jaar ago | 3

Answered
Vectorization of matrix multiplication with scalar (Scalar is value of other matrix at index i) and expm() operation
I don't think this problem is well suited for vectorization since you are already doing matrix multiplication at each iteration ...

meer dan 8 jaar ago | 1

| accepted

Answered
Problem with plotting/updating the graph in the GUI.
Your callback appears to be wrapped in single quotes. When the callback is a string, MATLAB evaluates the string. Your string ev...

meer dan 8 jaar ago | 0

| accepted

Answered
Simulink: How do I change the value of a gain block with code?
From our conversation in the comments: * You have 50+ gain blocks scaling signals in your model. * You intend to generate C ...

meer dan 8 jaar ago | 1

| accepted

Answered
algebraic loop warning despite using algebraic constraint block
That warning is simply telling you that you have an algebraic loop. I imagine that algebraic loops are created more often by acc...

meer dan 8 jaar ago | 0

Answered
Buildig a model with .m file
The default type for |logsout| is a <http://www.mathworks.com/help/simulink/slref/simulink.simulationdata.dataset-class.html#zmw...

meer dan 8 jaar ago | 0

Answered
How can I set a color gradient on my bar plot?
The most direct way in my opinion is to call |bar| once for each bar in your plot, assigning individual colors that way. y ...

meer dan 8 jaar ago | 0

| accepted

Answered
How to generate stair function ?
If you have the DSP System Toolbox, you can use the included block |Mean| to calculate a running mean of your signal, then reset...

meer dan 8 jaar ago | 0

Answered
How to draw a circle with a red annulus and green center?
How about a simpler implementation without the loops: xpix = 1140; ypix = 912; rad = 150; % Use zeros to initi...

meer dan 8 jaar ago | 0

| accepted

Answered
Transform content of cell array to strings
If all the lines of your data take the format of your example line, you could use x = regexp(myCellArray,'([\d.]*)','match'...

meer dan 8 jaar ago | 0

Answered
How can i draw a previously specified dimensions lattice ?
Using x as your list of x coordinates and y as your list of y coordinates of the circle centers: R = 1; % or whatever y...

meer dan 8 jaar ago | 0

Answered
how to display three one dimensional vectors as a 2 dimensional image
To create a mesh from your data, you could use |delaunay| and |trisurf|, which don't need the |x| and |y| values to be evenly sp...

meer dan 8 jaar ago | 0

Answered
How to calculate average time over a given period?
You could # convert your times to numeric values using |datenum| # trim your times to an even multiple of |step| # reshape ...

meer dan 8 jaar ago | 0

Answered
Merge matrices by matching first column values in MATLAB?
A= [4 5.3 5 7.3 8 2.5 9 4.7]; B= [1 3.6 0.4 2 3.9 0.6 3 9.2 0.9 4 5.1 0...

meer dan 8 jaar ago | 1

| accepted

Answered
How to use the data, but no polar function, to make polar plot?
I would use |polar| to plot the data; however it looks like R2016a has a preferred option -- |polarplot| ( <http://www.mathworks...

meer dan 8 jaar ago | 0

| accepted

Answered
How can I plot negative value with log scale?
Rather than use the transform you mentioned in your comment, t = sign(x)*log(abs(x)) you could use t = sign(x)*log(1+...

meer dan 8 jaar ago | 7

| accepted

Question


Why is my simulation signal logging output is empty in parfor loop (but not in for loop)?
I am running a simulation in Rapid Accelerator mode with the intention of running it in a |parfor| loop. I am running MATLAB r20...

meer dan 8 jaar ago | 2 answers | 0

2

answers

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...

bijna 9 jaar 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...

bijna 9 jaar 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...

bijna 9 jaar 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 ...

bijna 9 jaar 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.

bijna 9 jaar 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...

bijna 9 jaar 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...

bijna 9 jaar 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...

bijna 9 jaar 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...

bijna 9 jaar 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 ...

bijna 9 jaar 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...

bijna 9 jaar 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...

bijna 9 jaar 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...

bijna 9 jaar ago | 0

| accepted

Load more