Réponse apportée
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...

presque 10 ans il y a | 3

Réponse apportée
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 ...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 10 ans il y a | 0

Réponse apportée
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...

presque 10 ans il y a | 0

Réponse apportée
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 ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 10 ans il y a | 0

Réponse apportée
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...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
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'...

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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 ...

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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+...

environ 10 ans il y a | 7

| A accepté

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

environ 10 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
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...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 1

Réponse apportée
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 ...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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.

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 3

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 10 ans il y a | 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...

plus de 10 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
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...

plus de 10 ans il y a | 1

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Charger plus