Community Profile

MATLAB Enthusiast. Chemical Engineering Student; interested in computation and modelling. Enjoys Snowboarding.

Contact

Top 1% contributor

As Jan mentioned in this <http://www.mathworks.com/matlabcentral/answers/57638#comment_119764 post>, what's the reason behind it...

1 Answers

1

Asked 11 months ago

Change it to the following: VelocityVector=[]; while Velocity2>=-20 Velocity2=hastighet(acceleration(0,m,g),t,v0,t0); ...

accepted

Answered 2 years ago

With making the least amount of changes to your code, add this line before the for loop NC=[]; And change the NC=[X(i) Y...

When I'm answering questions in the forums and such, I haven't received any notifications when someone comments after my comment...

2 Answers

0

Asked 2 years ago

for i=1:3 A(i)=x((i-1)*3+1); B(i)=x((i-1)*3+2); C(i)=x((i-1)*3+3); R(i)=A^2+B^3+A*c; end Summation=sum(C);

Answered 11 months ago

Have you looked at <http://www.mathworks.com/help/matlab/ref/perms.html perms> built-in function? I'm sure you can manipulate to...

p(i) is one element, but you are trying to tell it to store multiple values, one of the following would fix your problem (Just r...

I didn't look through the whole code, but based on the error, try the following: line(i) =line(i)+Signal(pixel_line,:); ...

You can use the <http://www.mathworks.com/help/matlab/ref/sprintf.html sprintf> or the <http://www.mathworks.com/help/matlab/ref...

I think what you're trying to do is done using randn, so that dd=(10^(4) - 10^(-4)).*randn(1000,1) + 10^(-4) hist(dd,100...

From this <http://www.mathworks.com/help/matlab/ref/axis.html page>: axis equal sets the aspect ratio so that the data units ...

The problem is in the way you're handling the variables. Basically, the inputs to your function in this case are taken as variab...

Is the loop still telling the figure to plot even if there isn't any data recorded? You have a few ways around it: The first...

I am assuming that your problem is ill-conditioned or is very sensitive and depends greatly on the numbers from each step (or th...

Based on what you told me, let's say that the data for the years 1984-2009 is stored in matrix A, you would simply do: B=A(...

After knowing which axes handle the image is loaded into, you can simple use the <http://www.mathworks.com/help/images/ref/getim...

You can use the <http://www.mathworks.com/help/matlab/ref/trapz.html trapz> function to give you the area under the curve. In th...

You don't have the matrix (I assume) shortestPath or N_cities defined anywhere in your code. So it's either a global variable or...

If you know exactly what you want to switch, follow this example: A=[1 1; 2 2; 3 3] And you want to switch row 1 with ro...

If you're looking specifically for the value of -1, you can use the following: index1=find(A==-1)

Have you considered creating a 3D matrix with pages? Something like initializing a loop variable for each image? For example: ...

I know there is a way to do it, but my brain is failing me at the moment. What you can do instead is hold all the T values in a ...

You can try using the <http://www.mathworks.com/help/curvefit/subplus.html subplus> function. For example, you would use ...

There are two ways to do this, the following is the less efficient way x=[]; if true for y=2:0.1:10 x=[x; fzero(@(m) Y(m...

Answered 1 year ago

Let your data be in matrix A, and x,y are the indices where you want to change the value A(x,y)=2 %2 is just a random numbe...

This is only one of *many* ways (I would suggest pre-locating but I need more of the code) *Before *the for loop, add this line...

Look at the <http://www.mathworks.com/help/matlab/ref/text.html text()> matlab function. You can add a label at any point and yo...

Just use a loop, after the first line (after figure()), use for i=1:10 ...%Put code here end Make sure to add the end....

If I were to assume that the column e is the second column and the name of the matrix it's in is matrix1, then: RequiredCol...

One of your problems might be that you are defining x in two different sections of the GUI. What you can do is pass the handles ...

Load more