已回答
mistake how can i stop
You probably want a loop from X=100:200 Inside your loop, you select the cases you want: e.g. for x=100:200 condition1 = ...

5 years 前 | 0

已回答
Hello everyone. I'm trying to plot first , second and third order functions on the same graph. heres what i have so far. Its only giving me the last function. Any help would be much appreciated
Try this: figure; plot(x,y,'r'); hold on; plot(x,y2,'b'); In the plot command(s) replace the 'r' and the 'b with whatever p...

5 years 前 | 0

已回答
Draw a circle from 3 point
If you have the coordinates of the three points, you can use the method in the attached document.

5 years 前 | 1

| 已接受

已回答
How can I use simulink without time simulation?
If your timestep is constant, you can set your model to run at a fixed timestep. You can even specify a non-zero start time if ...

5 years 前 | 1

| 已接受

已回答
Averaging a signal at periodic intervals in Simulink
In my mind, the easiest way to do this is to create a Matlab function to do it, and embed the function into a Matlab block in Si...

5 years 前 | 2

已回答
Spring motion using Euler method
Since k has a value of -20, the value of w is a complex number, with a purely imaginary value.

5 years 前 | 0

已回答
Root of nonlinear equation on Simulink
Since root finding involves itteration, I would implement this as an MEX function in Simulink. Build a root solver function in ...

5 years 前 | 0

已回答
how to plot Bifurcation Diagram of chaotic map
You can plot all of the data in 3 dimensions using figure; plot3(x,y,z,'ob') This will create a 3D plot using a marker at eac...

5 years 前 | 0

已回答
Error in function ?
I think that the statement TBack; at the end of the interp function does not belong. Just delete it. Here is another issu...

5 years 前 | 0

| 已接受

已回答
How to find point closest to multiple circles?
Personally, I would use a numerical searcing algorithm. Overlay a grid on the problem space, then compute the distance function...

5 years 前 | 1

已回答
Simulink Ramp - On Demand
You can set the model time step in the "model configuration parameters" to be a variable that you define in the Matlab workspace...

5 years 前 | 1

| 已接受

已回答
What is the correct equation?
Variable t is a vector. If you want to perform element-wise multiplication on t, use .* in stead of * try x=u.*(1-exp(-s.*w...

5 years 前 | 0

| 已接受

已回答
Accelerometer Coordinate system rotation
In general, you can construct a 3-dimensional transformation matrix using a sequence of three 2-dimensional planar rotations. F...

5 years 前 | 2

| 已接受

已回答
How do I call a function within another function?
Your question is asking how to CALL a function from within another function, but your sample code is trying to DEFINE a function...

5 years 前 | 0

已回答
How to plot an orientated rectangle having coordinates and angle?
You have to perform the rotation in an object-centered coordinate frame. Define the rectangle: X = [-L/2 L/2 L/2 -L/2]; Y ...

5 years 前 | 0

| 已接受

已回答
How can I find the center of gravity of a moving object in simulink ?
The location of the mass center of a collection of parts is compued by finding the point about which the mass moment is zero, (i...

5 years 前 | 1

已回答
how can i save the output in simulink?
I think that the best way to accomplish this is set up the Simulink model so that is saves the output to the Matlab workspace us...

5 years 前 | 0

| 已接受

已回答
How would I create a simulink model for the lift equation?
The gain block can go just about anywhere.

5 years 前 | 2

| 已接受

已回答
Particle Velocity. Trying to solve for v0 with loops/conditional statements
There is nothing wrong with the approach that you want to use, however there are some details that will help improve the efficie...

5 years 前 | 0

| 已接受

已回答
Sample Code of Projectile Motion. Unknown constant that's used.
You are probably right about that. As you can see, the position states (X & Y) are updated by adding a delta position which is ...

5 years 前 | 0

| 已接受

已回答
Control signal for a triggered subsystem
@Rishabh Gupta's answer allows you to view the trigger signal from the block that triggers the subsystem. If you want the trigg...

5 years 前 | 0

已回答
How to draw the plot in the below attached type of graph ? Data is also attached ? plot First column on X-axis and Second column on Y-axis
The plot that you are illustrating is called a contour plot. But the data file that you have attached is insufficient for a con...

5 years 前 | 0

已回答
Finding local maxima on a slightly noisy data
The peaks are very distinct. Why not just select a threshold value (say, 20) and only use peaks that are above the threshold?

5 years 前 | 0

已回答
Center of mass problem
I wrote a function to compute the CG in X and Y. Then I used this function to find a solution by inspection (i.e. I manualy adj...

5 years 前 | 0

已回答
How to introduce Delay of milliseconds in Simulink model?
Assuming that the input signal has a value of 0 or 1, I think that this will work: You must make the following settings insid...

5 years 前 | 3

| 已接受

已回答
Rotate a 2D plot around a specific point on the plot?
% Given data vectors X and Y. % Want to rotate the data through angle "ang" about rotation center Xc, Yc X = [..]; Y = [.....

5 years 前 | 3

已回答
How do a write a loop code in MATLAB?
A "for" loop requires an "end" statement: for r=1:numPlotsR for c=1:numPlotsC ... ... end end

5 years 前 | 0

| 已接受

已回答
Is there a way to directly take the second derivative of data?
Here are some formulas that I sometimes use: Everything that John says about data smoothing and noise still applies.

6 years 前 | 1

已回答
Rotation about a point
If you want the equations they are as follows; X = [1 2 7 1]; Y = [1 4 2 1]; ang = -60 % degrees Xc = 1; % X cener of rota...

6 years 前 | 1

| 已接受

已回答
Using Simpson's rule to integrate function
OK. now I understand. I prefer to code an integration loop as follows; For the trapezoidal solution: StartTime = 0; EndTime ...

6 years 前 | 1

| 已接受

加载更多