Answered
How to Implement 3rd order equation in matlab script?
I would do it something like this: function ival = ifun(theta,psi) % Define constants K2 = 25; % just for example, you put in...

8 maanden ago | 0

| accepted

Answered
Plotting array filtered by column?
So to make @Dyuman Joshi suggestion more concrete % Define example points A = [ 1.0000 1.0000 5.5000 1.0000 ...

8 maanden ago | 0

| accepted

Answered
Can I use ismembertol to find x,y coordinates that are close to each other?
If I am understanding what you are trying to do correctly I think this would do what you ask % Define some example coordinates ...

8 maanden ago | 0

Answered
Search for files in directory, and use file name to input data
I think this example shows you how you could solve your problem % Find all of the relevant files % for this example I used Exc...

9 maanden ago | 0

Answered
FIFO push all values as vector
I assume you are using the Queue block in the DSP System Toolbox in Simulink. If so you should supply the In port with a 5 ele...

9 maanden ago | 0

| accepted

Answered
Does the resample function do sinc interpolation before resampling?
It sounds like you are not resampling at a new frequency (the main purpose of resample) but instead creating samples of a delaye...

9 maanden ago | 0

Answered
Error due to integration
I don't have your Excel file to test your code, but it looks like your problem is that the function given to integral, in your c...

9 maanden ago | 0

Answered
How to rename identical variables under one common name?
Here's a general way to handle this. Note no need for all those if statements % Read in the data T = readtable('myData.xlsx');...

9 maanden ago | 0

Answered
How to sort a cell array with respect to another cell array?
cellA = {'A', 'B', 'C', 'D'; 1, 2, 3, 4; 5, 6, 7, 8; 9, 1, 2, 3} cellB = {'C', 'A', 'D'; 1, 2, 3; 4, 5, 6; 7, 8, 9} [lia,lib] ...

9 maanden ago | 2

Answered
Can't connect to database when the servername has a backslash in it
There may be a much cleaner way to deal with this. I'm not sure of the details of why you get this error. Are you on a windows m...

9 maanden ago | 0

Answered
How to combine two graph from two function in another script?
Example Run script 1 % Script 1 % define first curve t1 = linspace(0,5); y1 = t1 + 2*t1.^2; Run script 2 % Script 2 % de...

9 maanden ago | 0

| accepted

Answered
How to find the intersection of two curves with the input data being two vectors?
Here is an example of one way to do this, you would have to put in the data for your curves, I just made up two curves for this ...

9 maanden ago | 0

Question


How to implement arrays of events and listeners
I would like to be able to apply the event - listener methodology to obtain notification when specified, individual elements of...

9 maanden ago | 1 answer | 0

1

answer

Answered
How to parse webpage JSON with temperatures in it.
You can use webread data = webread('https://api.meteo.lt/v1/stations/vilniaus-ams/observations/2023-06-21')

9 maanden ago | 0

| accepted

Answered
How to dynamically change Simulink variables from MATLAB App Designer after simulation is initiated
You should be able to use set_param, for this purpose. So for example: set_param('mymodel/Gain','Gain',num2str(11))

9 maanden ago | 1

| accepted

Answered
P(t)=25sin(35t) euler method
Just glancing at your code I can see a number of errors: The variable s is not defined anywhere before you call this line of co...

9 maanden ago | 0

Answered
Application of unique in the given code
I don't understand the details of your application, but there doesn't seem to be any problem with your use of unique here. What ...

10 maanden ago | 1

Answered
Why do I get the error "too many output arguments"?
You have defined your function removeByGamma with only one output argument function nvec = removeByGamma(tR) but then you call...

10 maanden ago | 1

| accepted

Answered
Select a columns of a Matrix using Selector in Simulink
I think this is what you are trying to do, in the example below I select the first and the third column from the 3x6 matrix : ...

10 maanden ago | 0

| accepted

Answered
Ball bounce - State equations
First I'm assuming you were told to use simple Euler integration, e.g. y(n+1) = y(n) + dy/dt*tStep, otherwise you could use for ...

10 maanden ago | 0

Answered
Align Signals Using Cross-Correlation
I think the problem you are having is that you must figure out how to sort the three signals to determine their arrival order so...

10 maanden ago | 0

| accepted

Answered
Function optimization meeting some conditions
In your case, you only have linear constraints, and bound constraints. So you don't need to use a function to define non-linear ...

10 maanden ago | 0

| accepted

Answered
Linear extrapolation in SIMULINK
You can use the 1-D Lookup Table Block to interpolate and extrapolate your values. It is in the Simulink Block Library under S...

10 maanden ago | 0

Answered
i want to add switch blocks that switches my input
The problem you have is not with the switch, but with the "algebraic loop" that is formed when the switch changes state. Please...

10 maanden ago | 0

Answered
Appy lsqcurvefit to multiple data sets with multiple parameters
Can you stack your data, so that if for example, using your terminology, Xdata_1,Xdata__,.. Ydata_1, Ydata_2,... Then fit Xdata...

10 maanden ago | 0

Answered
Matlab Margin Display From a Bode Plot Code
Assuming you have the Control System Toolbox, as you say there is already a function for computing the margins. If so, why not j...

10 maanden ago | 0

Answered
How to use cell as an input argument in an App?
You can add properties to your app and assign values to them, for example when the app is initialized. Then inside of your callb...

10 maanden ago | 0

| accepted

Answered
Find path through logical matrix (only walking right or down)
It seems natural to think of this as a graph traversal question, where the nodes in a directed graph are the locations in the ma...

10 maanden ago | 1

Answered
Reorganizing integer vector preserving order
I think this does what you are asking xp = [2 5 6 13 8 14 4 9 3 1 12 16 15 7 ...

10 maanden ago | 0

| accepted

Answered
A way to make the Simulink program run and then perform the calculation
You can set the model's StopFcn call back for this purpose. Go to the Modeling tab, model settings, properties,callbacks, and a...

10 maanden ago | 0

| accepted

Load more