Réponse apportée
Slope of a curve
Slope is the change in the y value divided by the change in the x value. When dealing with numerical calculations, there are a ...

presque 8 ans il y a | 3

| A accepté

Question


Why use an "if" statement to encapsulate a block of code?
I notice that many users encapsulate their code inside an if statement such as if true ... (code) ... end What...

presque 8 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Euler's Method for stiff ODE
Torsten is right. There is no way you will get a solution with a large step size (h=5). I checked out your code and it works ...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
How to create a counter variable in a loop
What you are describing sounds like a histogram. You can use the function "histcounts" to count the number of times a number ap...

environ 8 ans il y a | 1

Réponse apportée
Hi, I am new to MATLAB. I am not getting the plot .
Inside the abs function you are dividing two vectors. This is where the error is.

environ 8 ans il y a | 0

Réponse apportée
help please why ??
the statement sum(A(1)) is summing only the first element in A, which is 1. If you want to sum the first row, it shoul...

environ 8 ans il y a | 2

| A accepté

Réponse apportée
"Model based development and testing using PLC coder"
Model Based: Any endeavor that is "Model Based" places an emphasis on the use of simulation models. "Model Based Developm...

environ 8 ans il y a | 0

Réponse apportée
Divide vector of coordinates into even intervals.
Based on your description of the problem, this is what I would do: Given a vector of lat/lon positions which represents one r...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Newbie question - Error in line 2
Your equation set looks like it produces a direction cosine matrix for a planar rotation about the Z axis. If this is the case,...

environ 8 ans il y a | 0

Réponse apportée
How would I improve my euler code?
For trapezoidal integration, you use the average of two consecutive evaluations. This could be done by simply adding one line of...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
convert wind direction in true North to Math convention
Working with wind direction vectors can be confusing, because there are two different conventions which are both widely used. ...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
MATLAB -- how to create a parabolic arc?
This is a simple polynomial curve fit problem. If you have the curve fitting toolbox, the problem is solved by: x = [0 5 10...

environ 8 ans il y a | 0

Réponse apportée
Centering Multiple circular images
Here is a thought. The images appear to have some significant circular waves emanating from the (presumed) center. I would u...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Measure depth tread of the tire?
I can't imagine how you will get tread depth from this photo. Wouldn't you rather have a photo of the profile, similar to the a...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Merge block connection issue
Look at help for the merge block. Merge is intended for use with conditionally executed blocks where only one of the blocks i...

environ 8 ans il y a | 0

Réponse apportée
How do I create a for loop to separate each oscillation on a plot to take the average of each section.
Here is a suggestion for an algorithm: Your data looks like it settles down very well in between events, so I would use a sli...

environ 8 ans il y a | 0

Réponse apportée
How to find the nth derivative of square root of a polynomial using forward or backward differences. f(x)=sqrt(a0+a1 x + a2 x^2+a3 x^3+...an x^n)
See the attachment for numerical derivative formulas from my collection.

environ 8 ans il y a | 0

Réponse apportée
what do the variable P,I and D mean in PID(z) in simulink?
See the link to help in Guillaume's comment: Proportional Integral Differential

environ 8 ans il y a | 0

Réponse apportée
Generate a 4-Hz, 1000-point sine wave with a sample interval of T=0.002, and use quantiziation to digitize it using a 4-,8-,12-, and 16-bit ADC...
The first thing I notice is that signal_in is computed from signal_in = sin(2*pi*frequency*t) but variable "frequency" ...

environ 8 ans il y a | 0

Réponse apportée
Simulink: Buffer with constant input due to delay of input
The default sample time for a constant block is "inf". Based on the error message, the first thing I would check is the sample ...

environ 8 ans il y a | 0

Réponse apportée
How can i make my MATLAB code to run faster or robust while having many function calls and for loop up to thousands?
There is one blanket method which will speed up any Matlab code - use the Matlab compiler to generate an executable (.exe) file....

environ 8 ans il y a | 1

Réponse apportée
Why is an empty string not empty? isempty('') returns true, but isempty("") returns false
As near as I can tell, Matlab does not use the double quote character, so isempty("") is not a valid statement.

environ 8 ans il y a | 0

Réponse apportée
Please , how can I find the center and the radius of the inscribed circle of a set of points
I have worked this problem in the past, and the only solution I could find was a numerical searching method. There are a number...

environ 8 ans il y a | 1

Réponse apportée
How can I create semicircle signal in Simulink?
I would use the MATLAB Function block with the code in the PDF file attachment. (Found a typo in the first attachment. Pleas...

environ 8 ans il y a | 0

Réponse apportée
discrete simulink model problem
Although I am unable to open and view your model, a very common problem when converting from continuous to discrete is that the ...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Matlab function in Simulink - calling variable from workspace
Try declaring the variables to be persistent at the top of the function, i.e. persistent prev_angle prev_counter

environ 8 ans il y a | 2

| A accepté

Réponse apportée
How to get a sin function in simulink
I'm a little confused by the problem statement. Inside the sine function you have x/2000 * t. I'm not sure which represents th...

environ 8 ans il y a | 0

Réponse apportée
Find coordinates point M
See attachment. The symbolic solution will be very messy and require quite a lot of algebra. If you have the symbolic math t...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
[EMERGENCY NEED CRITICAL HELP] Numerically determine the Voltage
You are given an equation for i(t). All you need to do is integrate it directly, but your instructions are to perform the integ...

environ 8 ans il y a | 1

Réponse apportée
[PLEASE HELP] Derive the time and distance values...
After looking at your table, it is clear that you are given a time history of velocity and acceleration samples and you wish to ...

environ 8 ans il y a | 0