已回答
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...

9 years 前 | 3

已回答
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 ...

9 years 前 | 1

| 已接受

已回答
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...

9 years 前 | 0

| 已接受

已回答
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 ...

9 years 前 | 1

| 已接受

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

已回答
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 ...

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

| 已接受

已回答
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'...

9 years 前 | 0

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

已回答
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 ...

9 years 前 | 0

已回答
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...

9 years 前 | 1

| 已接受

已回答
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...

9 years 前 | 0

| 已接受

已回答
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+...

9 years 前 | 7

| 已接受

提问


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

9 years 前 | 2 个回答 | 0

2

个回答

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

已回答
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 前 | 1

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

已回答
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 前 | 3

已回答
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 前 | 0

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

提问


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 前 | 0 个回答 | 0

0

个回答

已回答
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 前 | 1

已回答
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 前 | 0

| 已接受

加载更多