Answered
solve differential equation by method of undetermined coefficient
tspan=[0 10]; ic=[2;6;1]; %initical conditions [t,x]=ode45(@myod,tspan,ic); plot(t,x) legend('equation 1','equation 2','...

7 years ago | 0

Answered
Integrating an anonymous function in a for loop
g=zeros(1,4); % preallocate %% For loop Attempt %% for i=1:4 Phi = @(z)(-(cos(sqrt(wn1)*z) - cosh(sqrt(wn1)*z) + c1*(sin(...

7 years ago | 0

| accepted

Answered
draw othorgonal trajectories using differential equations
Not more than two variables have to be symbolic so a,b,c valyes are assigned: syms y(x) a=2; b=3; c=5; ode = diff(y,x) == ...

7 years ago | 1

| accepted

Answered
Undefined function or variable 'adaptthresh'
https://in.mathworks.com/help/images/ref/adaptthresh.html?s_tid=answers_rc2-1_p4_MLT#bu2a9fp-1_seealso released in 2016a

7 years ago | 0

Answered
solving a linear ODE
You can verify the result with wolfram but here you will see a C which is constant which arises after antiderivative(without lim...

7 years ago | 1

| accepted

Answered
What do these mean/do on matlab?
>> 3:6:30 % starting number 3 step 6 till 30 ans = 3 9 15 21 27 >>

7 years ago | 0

Answered
How to add columns to form a matrix?
dcMatrix = dc.'

7 years ago | 1

Answered
How to add columns to form a matrix?
dc(i,1) % - > column vector dc(1,i) % - > row vector

7 years ago | 0

Answered
how to save a plot from a script
doc savefig doc saveas doc print

7 years ago | 0

Answered
Error using * (Inner matrix dimensions must agree.)
.*

7 years ago | 0

| accepted

Answered
please can anyone help me about this equation. theta value is 0 to 2pi
doc int doc integral

7 years ago | 0

| accepted

Answered
How to label points on a plot, when data is imported from a matrix?
https://in.mathworks.com/help/matlab/ref/text.html#responsive_offcanvas

7 years ago | 0

Answered
How to generate plot titles with the latex interpreter and larger font sizes?
Use handles and assign the size directly: plot(x,y, 'k', 'LineWidth', 2) h=title('*{\cal{R}}(t)* Model 2', 'interpreter', 'lat...

7 years ago | 2

Answered
why my first for loop in the following code is not working ?i'm able to run the program and i got the results for the last iteration i.e '650' .how can i get the result for all the iterations at once.
Your code works fine: (loop is superfluos though) T=50:30:650; S=0.005; r=90; Q=1; t=6.94*10^-5:0.0299:0.75; u=(r^2)*S./(...

7 years ago | 0

Answered
Array/Vector allocation not happening. Please Help.
You didn't define j

7 years ago | 0

Answered
How can matlab understand that the external button is pressed or not?
https://forum.arduino.cc/index.php?topic=367615.0

7 years ago | 0

Answered
Get the value of one .m file and use those values to plot in GUI
Make the check as a function file and create two input arguments(parameterising function) thereby passing the values as input ar...

7 years ago | 0

Answered
I wanted to find a x value for a specific value of y from my graph this code doesn't seem to work , how do i correct it?
[~,index] = min(ndt40);%minimum displacement ntime(index) % minimum time

7 years ago | 1

| accepted

Answered
Second argument must be a vector of symbolic variables. I am getting this error even though i have placed the arguments in an array. Please guide how to rectify it.
change your lines to the below lines(you forgot to define Q as symbolic) syms x y Q [x,y,z]=solve([eqn1,eqn2,eqn3],[x,y,Q])

7 years ago | 0

Answered
Keep getting the "Array indices must be positive integers or logical values." error
Pin(i+1) = Pin(i) - P0*(V/V0).^-gamma; ^----missed it

7 years ago | 1

| accepted

Answered
How to calculate distance between 3D points ?
If you implement this it's enough no need loops : sqrt(sum((pts1 - pts2 ) .^ 2))

7 years ago | 0

Answered
finding the minimums of function
There’s only one local maxima which you have plotted , local minima doesn’t exist in the given domain doc findpeaks doc fminbn...

7 years ago | 0

Answered
Interception points (two) for complicate function
Just preallocate(search documentation) before loop

7 years ago | 0

Answered
Problem with solve function
Try clear all at the very beginning and run your code , you are overwriting the variable which leads to confusion. FYI I got the...

7 years ago | 0

| accepted

Answered
using dsolve to equation
Define alpha as symbolic variable , remove strings and before -x1 it should be == and intial condition x(0)==0 without strings a...

7 years ago | 0

| accepted

Answered
Why the numerical values for function handle from matlabFunction should be written one by one?
Because your function requires three inputs but you fed in 1 f(aa(1),aa(2),aa(3))

7 years ago | 0

| accepted

Answered
How to read .csv file using textscan function ?
[num,txt,raw]=xlsread('yourcsv.csv'); plot(t,num)

7 years ago | 0

Answered
how can i convert the following script into function??
save it as main1.m file it becomes a function now you can also Parameterize your function if you want to... function main1 you...

7 years ago | 0

Answered
Undefined function or variable 'AppName'. ??? why ???
It likely visible that you have a fieldname AppName from the if statement but then in the next step you assign AppName as if it ...

7 years ago | 1

| accepted

Load more