답변 있음
Convert cartesian coordinates to polar coordinates
Edit your file - you did not declare it as a function, so Matlab uses it as a script. Also think about to vectorize your code, t...

대략 5년 전 | 2

| 수락됨

답변 있음
Creating a symbolic array
>> q = sym('q', [5, 5]) q = [ q1_1, q1_2, q1_3, q1_4, q1_5] [ q2_1, q2_2, q2_3, q2_4, q2_5] [ q3_1, q3_2, q3_3, q3_4...

대략 5년 전 | 0

답변 있음
I'm getting an error "Undefined function 'Romberg' for input arguments of type 'char'." I'm trying to code the romberg integration method.
For me it worked: a = 0; b = pi; nmax = 3; fun ='sin (x)' ; [t, r]= Romberg (fun, a, b, nmax) function[t , r] = Romberg...

대략 5년 전 | 0

답변 있음
Is it possible to solve the equation for x?
syms x a(1) = 0.89; a(2) = 6.7; a(3) = 26.12; a(4) = 0.07; a(5) = 78.05; a(6) = 34.01; a(7) = 0.33; a(8) = 22.49; a(9) ...

대략 5년 전 | 0

답변 있음
Fill a vector with two vectors
V1 = [3 8 6 7] V2 = [1 5 9 4] V = reshape([V1;V2],1,[]) V = V(3:end) results in: V1 = 3 8 6 7 V2 =...

대략 5년 전 | 1

| 수락됨

답변 있음
Trying to plot this curve what have I done wrong?
fun = @(x)(18*sqrt(2)*(sqrt(1+1./(1+x.^2)) + asin(1./(1+x.^2)-pi/2))) fplot(fun)

대략 5년 전 | 0

답변 있음
How to find the solution of inverse function ?
x = [1 2 3 4 5 6 7]; y = [3.6 1.8 1.2 0.9 0.72 1.5 0.51429]; p = polyfit(x,y,2) syms x fx(x) = poly2sym(p) gx(x) = finvers...

대략 5년 전 | 0

| 수락됨

답변 있음
Possible combinations for a vector
You could use allcomb from FEX: k = 0:2; coms = allcomb(k,k,k,k,k,k,k,k,k); as expected there are 3^9 = 19683 results

대략 5년 전 | 1

| 수락됨

답변 있음
how do i write a matlab script to sum this expression?
Symbolic: syms n positive integer N = 10000; eq = 1/n + 1/((n+2)*(n+3)); pretty(eq) sol = symsum(eq,n,1,N) sol_num = doubl...

대략 5년 전 | 1

답변 있음
ODE Function time output
Use events: Z0 = 6; Zt=0.05*6; tspan = [0 24]; opts = odeset('Events',@(tZ,Z)EventsFcn(tZ,Z,Zt)); [tZ,Z,tZe,Ze,iZe] = ode45...

대략 5년 전 | 0

| 수락됨

답변 있음
Why isn't my code graph anything.
Try: %create a cater plot clear all; %x = [20,30,40,50] x = [-3,-1,1,2] y = [8,23,28,34] y=[8,23,28,34].' colum = [...

대략 5년 전 | 0

답변 있음
How find symbolic solution matlab
It appears that there either is no symbolic solution or Matlab is not powerful enough to find one. For sin(t) it would work. How...

대략 5년 전 | 1

답변 있음
ode 45 and for loop
k = 0; T_sol = cell(1,100); X_sol = cell(1,100); for ii = 0.1:0.1:10 k = k+1; [T,X] = ode45(@(t,x)fx(t,x,ii), [0 ...

대략 5년 전 | 0

| 수락됨

답변 있음
Graph Plotting the differential equation
yyaxis left fplot(qSol,[0, 100]) yyaxis right fplot(TSol,[0, 100])

대략 5년 전 | 1

| 수락됨

답변 있음
Defining function file of ODE function
C0 = 5; tspan = [0 10]; [t,C] = ode45(@Conc,tspan,C0); plot(t,C) function dCdt=Conc(t,C) k1=0.7; Vo=1; Q=Vo; Cin=200; ...

대략 5년 전 | 1

| 수락됨

답변 있음
How do i plot this quadratic graph?
x = -10:10; y = polyval([1 -2 -4],x); plot(x,y) r = roots([1 -2 -4]) text(r(1),0,'\leftarrow Root') text(r(2),0,'\leftarrow...

대략 5년 전 | 0

답변 있음
Solve a Matrix equation
Symbolic approach: A = sym('A', [4,1]) B = magic(4) P = 13 sol = solve(A'*B*A==P, A) sol.A1 sol.A2 sol.A3 sol.A4 % This...

대략 5년 전 | 0

답변 있음
Suppose that at any given time t (in seconds) the current i (in amperes) in an alternating current circuit is i = 2 cos t + 2 sin t. What is the peak current for this circuit (largest magnitude)?
Do the same as shown in your question before. Then use diff(...) == 0 to find extremum points. The solve function maybe helpfu...

대략 5년 전 | 1

| 수락됨

답변 있음
unable to find symbolic solution
1. The condition for the second ode is invalid - i assume you meant: cond = T(R)==T0; instead of cond = q(R)==T0; 2. As...

대략 5년 전 | 1

| 수락됨

답변 있음
Find intersection point between u(t) = t^2(t-1) and u = 10.
Simply use the function you calculated: >> t_sol = vpasolve(uSol == 10,t) ans = ...

대략 5년 전 | 1

| 수락됨

답변 있음
Error using evalin Undefined function or variable 'x'. Error in sym/eval (line 11) s = evalin('caller',vectorize(map2mat(char(x))));
clear AC=0.15; BC=0.2; AD=0.35; xA=0; yA=0; rA=[xA yA 0]; xC=AC; yC=0; rC=[xC yC 0]; syms xBsol yBsol ii=0; for ph...

대략 5년 전 | 1

| 수락됨

답변 있음
find the equation of tangent to the curve y=2(x^1/2) at (1,2)
https://de.mathworks.com/help/symbolic/syms.html#buoeaym-1 https://de.mathworks.com/help/symbolic/diff.html

대략 5년 전 | 1

| 수락됨

답변 있음
How to find the solution for the system of equations
Your system is inconstistent and therefore there is no solution: % x is shorter than lambda x = sym('x', [14 1]) ; % system...

대략 5년 전 | 0

| 수락됨

답변 있음
How can I delete even rows in a matlab Matrix
>> A = [1 2 3; 4 5 6; 7 8 9; 0 -1 -2] A = 1 2 3 4 5 6 7 8 9 0 -1 -2 ...

대략 5년 전 | 0

| 수락됨

답변 있음
ode45 Two Variable Differential equation Problem - Too many inputs error
Fixed the input in your functin. Rising t>7 gives warning, since the problem appears to be stiff: %% Initial Conditions: % Ini...

대략 5년 전 | 0

| 수락됨

답변 있음
Graphing using Matlab. How would you graph a function using matlab?
a = 24; b = 4.8; ii = 0:20; y = a + b.*ii; plot(ii,y)

대략 5년 전 | 0

답변 있음
Please explain what this error is...
Your function has to be called with 2 inputs a and b for example when a=2 and b=5: [res1, res2, res3] = MyFun(2, 5)

대략 5년 전 | 0

답변 있음
Can anyone help me fix that error please
You missed to define several variables, which are used in your equations: % several used variables are not defined! - i set the...

대략 5년 전 | 0

답변 있음
fsolve with one variabel
Tinc = 5+273; Tinv = 45+273; mv = 1000; Cpv = 4180; A = 0.032*(21-2); h = 20; U = ...

대략 5년 전 | 2

답변 있음
Find the value which causes an error from a vector
This works with logical indexing, therefore avoids the if / else logic and should ensure that you do not need any error messages...

대략 5년 전 | 0

더 보기