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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

| A accepté

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

plus de 10 ans il y a | 1

| A accepté

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

| A accepté

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 1

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

| A accepté

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

plus de 10 ans il y a | 0

| A accepté

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

plus de 10 ans il y a | 0

| A accepté

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

| A accepté

Question


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

plus de 10 ans il y a | 2 réponses | 0

2

réponses

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

plus de 10 ans il y a | 3

| A accepté

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

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 2

| A accepté

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

plus de 10 ans il y a | 1

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

plus de 10 ans il y a | 0

Question


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

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

1

réponse

Question


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

presque 11 ans il y a | 1 réponse | 0

0

réponse

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

presque 11 ans il y a | 0

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

presque 11 ans il y a | 1

| A accepté

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

presque 11 ans il y a | 2

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

presque 11 ans il y a | 0

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

presque 11 ans il y a | 0

| A accepté

Charger plus