Community Profile

Contact

Top 5% contributor

What o I have to do in order to get rid of the message in ode45 line 309 (error tolerance message). I use try and then I put th...

2 Answers

0

Asked 12 months ago

I'm 100% sure that was my doubt. I was thinking about it. Maybe the problem was different workspaces and iquality in the variabl...

Answered 1 year ago

I've got 2 files the first file with a line (1) calls the file (2). (1) P0=fzero(@(P0) estimateSurfacePressure(P0,false,extP...

Asked 1 year ago

I'm trying to understand a code and there's the first line of it. Could anyone explain me what exactly this works ? The code is ...

A{1}=[1 2 2; 2 2 2; 3 1 2; 4 5 6; 5 5 6; 7 1 2] ; A{1}(4:5,:) = [] ; it means access the first element of cell 1 (which ...

I came across this script and I've seen h = ... what does it mean? axis(1.2*[-1 1 -1 1]) axis square box on hold o...

If I consider the function react2 and write the function react in the prompt command it will work!! But I want to use only the s...

I Have a line in a program P0=fzero(@(P0) estimateSurfacePressure(P0,false,extPar), [1 25]); and inside es...

1 Answers

I have just found out that ode45(@fun,tspin,x) can have instead of tspin = [value1 value2]. tspin could be a linspace(a,b,c) whe...

Hi guys, What does it mean when we write in a code P0 = fzero (@somefunction, [1, 25]). Does it mean search for an answer in ...

I've got 2 .m files. The line which calls the second file is [f1 q] = fzero(@avaliator,const.guessf1,const) it'll ...

I have this k.range = [-pi/4 pi/2] ; k.init = sqrt(2)/2 ; k.options = odeset('Events',@mystopper); suppose I ...

function eulers_for_mv a = .5 ; t = linspace(0,2) ; dt = t(2) - t(1) ; x = zeros(1,length(t)); v = zeros(1,l...

I had a big problem with a code because of this mistake which looks silly but maybe it's not.. suppose f1 = .4 ; f2 =.51...

if true % code end function elements tspan = [0 1]; inits = [0 1]; [t,y] = ode45(@Y,tspan,inits); plot(t,y) fun...

Suppose I run this code by typing in the command line [t p] = ode45(@spring,[0 4], [0 0]); I don't understand first of all how M...

I learned some things about this. One, even defining rho and G outside the functions "dp" and " deriv_M" it seems that when MAT...

f = @(t,x) [-x(1)+3*x(3);-x(2)+2*x(3);x(1)^2-2*x(3)]; what does "@(t,x)" represent and there's some room between the expre...

Suppose I create a simple matrix y = [ 2 4; 6 1] and then when I plot it using plot like, plot(y,'*') I tried to understand how...

I just would like to know how it works. e.g t = 71 ; c = (t-32)/1.8 ; hey = ['The temperature is , c , 'C'] #...

Hi, I am trying to solve an equation with ode45 but it does not actually give me what it's expect to. The equation is the clas...

Asked 8 months ago

I've seen some codes which is actually sometimes called by other codes and then I see some 'pause(0)'. pause makes the code to s...

Hi, I am having a little trouble setting up a simple orbit code so I could plot the orbit. Could anyone see my code? I have al...

0 Answers

Asked 9 months ago

Hello, I'm trying to plot an orbit with the Sun and Jupiter only. I assumed circular orbit and all the simplicity posible...

[IC,SurfaceValues,exitFlag]=fminsearch(@integratePlanetODEs,IC,[],extPar); This is a line of a code and IC could supposedly v...

Suppose I have a structure k with these elements range, init and options. I noticed that since I put k inside ode45 I have an er...

I used debugger to help me out but some things don't make sense for me. y0 which is the initial condition is given as a colu...

Whenever I try to use actual values for constants in a physical problem I get stuck in a 'busy' message from MATLAB. What do I h...

There`s an equation called filament solution by Ostriker. I need to compare his solution to the solution which comes from a sy...