已回答
I need to write a program that defines whether a string is a PALINDROME or not WITHOUT using fliplr, reverse or similar commands. Can anyone help with that ?
A palindrome is a word or phrase that is exactly the same forward and bacward. I would use a loop to compare the first characte...

6 years 前 | 0

已回答
my newton raphson nested while function is not iterating well. What do I do?
I haven't spent the time to understand all of your code, but one thing jumps out at me from the start. Inside the while loop, y...

6 years 前 | 0

| 已接受

已回答
How can i create xyz coordinant from pan-tilt system angles.
It seems that you want to convert from spherical coordinates to Cartesian coordinates. You have pan angle (azimuth) and a tile ...

6 years 前 | 0

| 已接受

已回答
Simpson Rule issue - Approximation worsens as n increases
I have not tried to run your code, but at first glance I see a typo in the code. sum=sum+((b1-a1)/2)/3*(f(a1)+4*f((b1-a1)/2...

6 years 前 | 2

| 已接受

已回答
How to convert [-90 90] range of elevation angel in imgradient3 to [0 , 180]?
I think that if you want to convert the range -90 to +90 to 0 to 180, all you need to do is add 90 to each value. Similarly,...

6 years 前 | 0

已回答
runge kutta vs ode
You are very close. In your Runge-Kuta solution, you specified Y0 = 5, Y(1)=5; but in your ode23 solution, you specifi...

6 years 前 | 0

| 已接受

提问


Why does this data file cause Matlab to lock-up?
I just spent the day trying to figure out why Matlab was locking up and not responding. It turns out that deleting a large data...

6 years 前 | 1 个回答 | 0

1

个回答

已回答
How to normalize a matrix such that each column sums equal 1
[row, col] = size(A); for i=1:col P(:,i)= A(:,i)/sum(A(:,i)) end

6 years 前 | 1

已回答
how to find the bottom peaks in the graph?
Here is a similar problem. To find the bottom peaks, just change one line from if(D(i) >0 && D(i+1)<0 to if(D(i)<0...

6 years 前 | 0

已回答
Plot 2D graph
Put all the graphs on a single figure: x=-2*pi:0.04:2*pi; figure; plot(x,sin(x),'r'); hold on; plot(x,2*sin(x),...

6 years 前 | 0

| 已接受

已回答
How to plot in 3d line to multiple point from origin?
How about this: A = 3x3 matrix figure; for i=1:3 px=[0, A(i,1)]; py=[0, A(i,2)]; pz=[0, A(i,3)]; ...

6 years 前 | 0

已回答
comparing consecutively numbers to find the peaks of a function
I assume that the points are Y is a function of X. You have a vector Y(600) and a vector X(600) and you want to find the relati...

6 years 前 | 1

| 已接受

已回答
Help with my fibonacci sequence code
This is how I did it. This function will give the nth number in the Fibonacci sequence: function f=fib(n) s=[1, 1]; ...

6 years 前 | 1

| 已接受

已回答
How can i measure Angle in 3-D?
The link in the answer by Aquatris is not working for me. The angle between any two lines is given by the dot product. Def...

6 years 前 | 0

| 已接受

已回答
Y=4x+7
7

6 years 前 | 0

| 已接受

已回答
how to generate n dimensional lookup table, n=5, in simulink?
Personally, I would make it an S-function and program it in C++.

6 years 前 | 0

已回答
Calculation velocity and acceleration from X and Y coordinates
It appears from the sample data that you show that the time interval is not constant in your data. This will cause some difficu...

6 years 前 | 0

| 已接受

已回答
How to scale the x axis ?
First, you need to get the handle to the current axes: h=gca; This gives the handle to the current plot axes. Now you c...

6 years 前 | 0

已回答
How to rotate ANY vector to a given angle in the space?
I am assuming that what you want to know are the rotation angles that would be used to perform a Z-Y rotation sequence in order ...

6 years 前 | 1

| 已接受

已回答
I am trying to get the height of a flying object from the ground using single camera
There are two reasons why an object off-boresight looks smaller than an object that is in the center of the field of view. Ta...

6 years 前 | 0

已回答
S-function Builder - Run Only Once
Here is a technique that I sometimes use. You can input an integer or Boolean parameter to the S-function. Use a "Memory" bloc...

6 years 前 | 0

| 已接受

已回答
Time delay in matlab fuction block used in simulink model.
Place your Matlab function block into a triggered subsystem block (or an enabled subsystem block), then trigger/enable the bloc...

6 years 前 | 0

| 已接受

已回答
how to implement Simplest down counter
Your logic seems to suggest that you want something more than just a decrement counter. A simple decrement counter would work e...

6 years 前 | 1

| 已接受

已回答
2D Interpolation of Scattered Data
I suggest you try "interp2" using the "cubic" method. (you may want to try the "spline" method also). These should be better t...

6 years 前 | 0

已回答
Why is during intgration of velocity signal in simulink exhibits drift in position signal ?
If you have two different simulation of the same thing that show different results, it is clearly an indication of an implementa...

6 years 前 | 0

已回答
how to check if a 3D point is inside a 3D cone
1) Define a unit vector, U, which points along the axis of the cone. 2) Define vector VR which points from the cone vertex, V...

6 years 前 | 2

已回答
ode45 System of Equations Difficulties - Launch Vehicle Simulation
The ODE solver has a hard time dealing with discontinuities. If any part of the equation set contains discontinuities, or even ...

6 years 前 | 1

| 已接受

已回答
Simulink: Signal for specified timesteps
Use a triggered subsystem to generate the desired signal. The trigger signal is based on time. <</matlabcentral/answers/uplo...

6 years 前 | 0

已回答
Simulink: is there something like a “pre-build” callback function?
In the Simulink model configuration parameters, there is a tab for "Simulation Target\Custom Code". Here you can specify "Inclu...

6 years 前 | 0

已回答
Simulink 'To Workspace' block inactivated when additional simulation parameters are provided
I have noticed a similar issue using simstate. see the link. <https://www.mathworks.com/matlabcentral/answers/398441-matlab-...

6 years 前 | 1

| 已接受

加载更多