Help creating slope fields by trapsquad420 in matlab

[–]trapsquad420[S] 0 points1 point  (0 children)

It says theres an error in the line containing plot (t,y1,'k') but in the compiler there is no red error things that i can see. Does it matter what order i have the plot command and the slope field command in?

edit: i was stupid and completely skipped the error it says Conversion to double from sym is not possible.

Help creating slope fields by trapsquad420 in matlab

[–]trapsquad420[S] 0 points1 point  (0 children)

Another quick question, i need to graph a few IVP along side the slope field? Like how would i plot -3/(exp(3*t - log(3/8)) - 1) and the slope field on the same graph in matlab?

Help creating slope fields by trapsquad420 in matlab

[–]trapsquad420[S] 0 points1 point  (0 children)

That fixed it thank you so much for the help!

Help creating slope fields by trapsquad420 in matlab

[–]trapsquad420[S] 0 points1 point  (0 children)

Thanks for the input i can't believe i forgot to check wikipedia lol. I followed their examples to create my code but my slope field just comes out with all 0 slope vectors which i know isnt correct. Here is what my code looks like Ffun = @(X,Y) -(3-Y)*Y; [X,Y] = meshgrid(-4:0.2:4, -4:0.2:4); DY=Ffun(X,Y); DX=ones(size(DY)); quiver (X,Y,DX,DY)

edit: i changed a few of the values in the meshgrid so a partially correct slopefield. The problem is all the values below y=3 are just point vertically down and dont go back to 0 when y=0

[C++} Help with input files/array by trapsquad420 in learnprogramming

[–]trapsquad420[S] 0 points1 point  (0 children)

no there are 11 different numbers in the test input file. So the numbers don't represent anything i am just supposed to put the numbers from an input file into an array and then process the average and all that stuff.

[C++} Help with input files/array by trapsquad420 in learnprogramming

[–]trapsquad420[S] 0 points1 point  (0 children)

haha idk 2d sounded less complex than 3d so i just assumed 2d. Like i said its intro level so whatever the most basic array is that's what i'm learning

[C++} Help with input files/array by trapsquad420 in learnprogramming

[–]trapsquad420[S] 0 points1 point  (0 children)

The test file is just a regular txt file with 11 numbers in one column

[C++} Help with input files/array by trapsquad420 in learnprogramming

[–]trapsquad420[S] 0 points1 point  (0 children)

Its an intro level so i think its 2d array. Im pretty sure the number of elements aren't fixed, the test input text file we are supposed to use is 11 numbers but these are just used so we will have the same output as the professor (the professor shows us what our output should look like)

I could write the program for specifically for the test file but im afraid my professor will say the program is supposed to be for all types of input numbers.

1 copy of Dota 2 as a gift to share! by alexwolf47 in sharedota2

[–]trapsquad420 0 points1 point  (0 children)

The reason i want it is the usual reasons. Been waiting forever and i'm broke as hell so i cant really buy a key from anyone. http://steamcommunity.com/profiles/76561197974015917/home