回答済み
How to plot all figures in only one plot?
Here's one simple way: x=-pi:0.1:pi; c=-6:5; figure hold on for i=1:length(c) y=c(i)*x.^(2)+4*x+2; plot(x,y) end...

1年以上 前 | 0

| 採用済み

回答済み
Error in Hermite Polynomial
In line for j = 0:i-1 you have j starting at zero. Matlab's indices start at 1, so the following line should have X(j+1) not ...

1年以上 前 | 0

回答済み
Matlab code not computing
The use of square brackets in the scatter function is not the only problem! Are you looking for something like this? p=-1; z=...

1年以上 前 | 0

| 採用済み

回答済み
how to plot the path of circular beam oscillation welding?
Like this? A=1; f=50; vf=0.02; time = linspace(0,100,500); x0 = vf*time; theta = 2*pi*f*time; x=A*cos(theta)+x0; y=A*sin...

1年以上 前 | 0

回答済み
how to change the direction of the airfoil
Change contourf(real(J),imag(J),imag(f),v2); %%%%% fill(real(zair),imag(zair),'k') to contourf(-real(J),imag(J),imag(f),v2);...

1年以上 前 | 0

| 採用済み

回答済み
How to use 5 function coupled each other using ODE45? it is possible?
Better like this: MM0 = [10, 0, 0, 0, 0]; tspan = [0 100]; [t, MM] = ode15s(@mymode, tspan,MM0); M1 = MM(:,1); M2 = MM(:...

1年以上 前 | 0

| 採用済み

回答済み
convert a column matrix with many rows into multiple column of equal rows
Try the reshape function.

1年以上 前 | 0

回答済み
"Not enough Imput arguments" ERROR
You haven't included J as an input argument to function Feedback_Ven_STEP.

1年以上 前 | 0

| 採用済み

回答済み
Using polyfit in two arrays to detrend data.
polyfit just returns the coefficients of the polynomial. You need to use them in polyval to calculate data values.

1年以上 前 | 2

回答済み
Implicit solution using pdepe 1D advection diffusion reaction equation
I think you've overcomplicated the situation! Should be more like the following (which you should check very carefully, as I di...

1年以上 前 | 0

回答済み
I want to plot the vector field on F=x i+ j
Do you mean like this? [x,y] = meshgrid(-3:.15:3,-3:.15:3); Fx = x; Fy = ones(size(y)); %%%%%%%%%%% figure; quiver(x,y,Fx,F...

1年以上 前 | 0

| 採用済み

回答済み
i have two set of data for temperature measurements which vary depends on each other. the variation may be divided into three portions. how can we seperate these portions
Here's a possible way (assumes the data is already in the workspace): dT2 = gradient(T2); minval = min(dT2(Time<2.5)); ix = f...

1年以上 前 | 0

回答済み
How to surf very small values keeping the same ratio?
Multiply them all by 1e4.

1年以上 前 | 0

回答済み
whats preventing my code from generating the proper results
I don't know anythng about the physics of your scenario, but are you sure you are calculating NLOS_LOWER_BOUND correctly? The f...

1年以上 前 | 0

回答済み
Finding the optimal solution for a data with two variables
Here's a possible approach (I've used relative errors as the values of the two columns are an order of magnitude different): % ...

1年以上 前 | 0

| 採用済み

回答済み
Using loop to sum value of an array and summation
Here's one way: J=[1 2 3 4 5 6 1 2 3 4 5 6]; step = 3; ix = 1:step:numel(J); for i = 1:numel(ix) p(i) = sum(J(ix(i)...

1年以上 前 | 1

| 採用済み

回答済み
Solving a system of inequalities using an eigenfunction and if, else.
Your function needs to be more like this, for example. Set values of x outside the function, call the function with these value...

1年以上 前 | 0

| 採用済み

回答済み
Почему появилась ошибка?
Seems overcomplicated for a numerical solution! How about simply f = @(x) x - 5 - 1/3*cos(2*x+1) + 2*x./(2+x.^2); g = @(x) x ...

1年以上 前 | 0

回答済み
How to write 2D heat conduction exact solution for Inf n?
Your term sinh(n*pi*x/L) should be sin(n*pi*x/L). See the following code (which can be made more efficient!): L = 1; H = 2; ...

1年以上 前 | 1

| 採用済み

回答済み
Help with Riccati equation
You haven't defined B (in the function definition)

1年以上 前 | 0

回答済み
How to create a time function and make a line rotate at a certain angular speed?
Do you mean something like this? r2_length = 2; tend = 10; % s dt = 0.1; t = 0:dt:tend; omega = 1; % rad/s theta = omega*t...

1年以上 前 | 0

回答済み
Cannot get integral function to work for two limits
Try this %Enthalpy datum conditions (Kelvin) Ti=(25+273.15); %Input temperature (Kelvin) T1=(183+273.15); %Output tem...

1年以上 前 | 0

回答済み
I have some errors in executing the following code, can anyone help me please?
You have no initial guesses for y(5) and y(7). And what about y(6)?

1年以上 前 | 0

回答済み
How can I plot a diagram with 12-15 different colors
Specify the colors with RGB triplets. doc Color

1年以上 前 | 0

回答済み
This code give me an error of Index exceeds array bounds.
More like this? m=60; g=9.81; k=80; m_2=10; m_1=15; h=100; w=15; t=1:10:100; x = zeros(1,numel(t)); for i=1:numel(t) ...

1年以上 前 | 0

回答済み
Why does MATLAB grader refuses to get my answer with the double integral evaluation problem?
As follows Oops! I did the sum incorrectly! Should have been like this: % box side length delta = 0.01; % mid box points...

1年以上 前 | 0

回答済み
initial condition vector longer than ODE vector?
Do it like this: a=2; b=5; % v0 is now set to 10 v0=10; % Using a,b to determine rest of variables R=10*a; C=0.0001...

1年以上 前 | 1

| 採用済み

回答済み
Can some one fix this code? I am unable to understand this code? Though fixing one problem another problem is arising ! please help!
In the following line: G = (randn(Np,Mtot)+1j*randn(Np,Mtot))/sqrt(2); % When i=1, G is 1x20, but H is 20x2 so the following l...

1年以上 前 | 0

回答済み
Connect all dots I polarplot
Like this? r=[10:36:360 10]; r = r/360*2*pi; s=[5,3.5,5,4,4,3.5,4,4.2,4.7,4, 5]; polarplot(r,s,'-x')

1年以上 前 | 0

さらに読み込む