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

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

| 已接受

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

| 已接受

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

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

| 已接受

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

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

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

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

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

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

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

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

| 已接受

已回答
Negative squareroot quick and easy
|sprint| is taking the real part of your complex result. Try: sprintf('R is negative. The square root of %1.1f is %1.1fi',R...

9 years 前 | 0

| 已接受

已回答
Intepolate in 2D loop of points
If I were you, I would throw away the data that is not on the edges by finding the min and max of each of your columns of data p...

9 years 前 | 0

| 已接受

已回答
Integral problem cant get it to give me a number
You should look at the documentation for |int|, the integration function specific to the Symbolic Toolbox. You will also need |s...

9 years 前 | 0

已回答
ERROR for Matrix dimensions must agree.
Your variable |z| is not the same size as |Rf|, which matches the size of your inputs. The element-wise multiplication is happy ...

9 years 前 | 0

| 已接受

提问


Simulink Model Callbacks - How can I tell if the user pressed Run or Build?
How can my model's InitFcn tell the difference between initializing after the user pressed Run versus after the user pressed Bui...

9 years 前 | 2 个回答 | 0

2

个回答

已回答
Current system time as a Timestamp
Try help now for details on MATLAB's function |now| that returns the current time as a DateNum. You might also be intere...

9 years 前 | 3

| 已接受

已回答
plot the time series data
To set your own x-axis limits, use the |xlim| function. To control the labels on the x-axis, you need to set the |XTick| propert...

9 years 前 | 0

已回答
Split a vector into 2 vectors randomly
I think you will find the function |randperm| useful. You can use it to generate a random order for your 150 rows and then selec...

9 years 前 | 2

| 已接受

已回答
Using convolution to determine pdf of adding two triangular random variables
The |conv| function is essentially doing a numerical integration over |x|. It is not necessary that both pdfs be based on the sa...

9 years 前 | 1

已回答
filling the first NaN right after the last non NaN with a value that is half of the non NaN
You can use the function |isnan| to find the appropriate values to replace as in the following code: p = [ NaN 2...

10 years 前 | 0

提问


A Simulink.findVars equivalent for elements of a structure
The parameters used in my Simulink model are organized into a many-level structure. I would like to find out which of the elemen...

10 years 前 | 1 个回答 | 0

1

个回答

提问


How to best randomize Simulink Random Number seeds for Rapid Accelerator simulation
I have a large model that I would like to execute iteratively in rapid simulation mode inside a parfor loop. The model contains ...

10 years 前 | 0 个回答 | 0

0

个回答

已回答
I am trying to create a 5x5 array. How will I achieve this by using a nested loop?
The array you asked for can be created without a nested loop. Try: (1:5)'*(1:5) The enclosed statement, |(1:5)|, creates...

10 years 前 | 0

已回答
Can I use if ..break...else inside the same loop?
Your code looks fine. However, you can simplify the structure by adding |target = 0;| before your loop and omitting the else sta...

10 years 前 | 1

| 已接受

已回答
appending an empty list
The behavior of |append| is specific to the data types input to it. For the basic types, you are probably better off using ...

10 years 前 | 2

已回答
How to plot a function against a matrix?
I am assuming you mean to find the values of your function |g(x)| over all values defined in |r2|. If |a|, |b|, and |c| are scal...

10 years 前 | 0

已回答
Hide all elements of an axis
In MATLAB R2015a, Legends are children of the figure, not the axes. For example, I expect you will be able to find the legend wi...

10 years 前 | 0

| 已接受

加载更多