回答済み
Hold on and Hold off command keeps all plots on subsequent graphs
figure(1) fplot(eqn1,[0,4*pi]) hold on fplot(d_eqn1,[0,4*pi]) figure(2) fplot(eqn2,[-10,10]) hold on fplot(d_eqn2,[-10,...

3年以上 前 | 0

回答済み
Unable to perform assignment because the left and right sides have a different number of elements.
K=zeros(1,4100); L=zeros(1,4100); Check the size of vectors K and L

3年以上 前 | 0

回答済み
How can I change the title of a figure through each iteration of the loop?
close all; clear variables; clc; % % For Phi/Psi = +/-10 CoverageArea_mean_10 = {[84.4735,21.1779,6.4247,2.1416],[45.2112,...

3年以上 前 | 0

回答済み
How can I get a profit function P(x,y) using a cost function C(x,y) and a revenue function R(x,y)
x = 1; y = 1; % assume some input values R = @(x,y) 6*x.*y + x.^2; % use funciton handle to define the equations C = @(x,y)...

3年以上 前 | 0

回答済み
How to make the condition for checking the matrix value ?
popnew1 = 2-A(mutated);

3年以上 前 | 0

| 採用済み

回答済み
Value of the array in calculation and graph is different
format long k=10; Es=0.05; t=273; TempK=0:1500; cp=0:0.2:1.2; cp=0.99403+((1.671e-4)*(TempK))+((9.7215e-8)*(TempK.^2))-((9...

3年以上 前 | 0

回答済み
Index exceeds the number of array elements. Index must not exceed 751.
M(n)=M(n)-(dM*dt);

3年以上 前 | 0

| 採用済み

回答済み
how to solve error using horzcat dimensions of array being concatenated are not consistent
You can transpose the output of ode23 as follows y(j,:)= [i, x(:,1).']; % transpose col matrix plot(y,'r.'); drawnow

3年以上 前 | 0

回答済み
The following error occurred converting from sym to double: Unable to convert expression containing symbolic variables into double array..
syms theta1 theta2 t=[0.01:0.1:10]; l1= 50; l2= 50; l3= 10; dt = 1; x2 = l1*cos(theta1) x3 = l2*cos(theta1+theta2)+ x2;...

3年以上 前 | 0

| 採用済み

回答済み
Driving force of driven damped harmonic oscillator missing
c0=299792458; %speed of light lase_lambda = 1064e-9; %wavelength lase_freq = c0/lase_lambda; w0 = 2*pi*lase_freq; ...

3年以上 前 | 0

回答済み
Analytical Solution of Double Integral in Symbolic Math
syms x a = 2; sol = int(sin(x).*(a.^2*cos(x).^2 + sin(x).^2/a).^(1/2),x,[0,pi]) vpa(sol) % use vpa

3年以上 前 | 0

| 採用済み

回答済み
Plot title keeps rewriting on top in livescript
close all % add this line at begin x=linspace(0,5,100);

3年以上 前 | 0

| 採用済み

回答済み
polar plot of n^2 = 1+g equation
About the 2nd equation, you can plot it straightforward by plugging values for variables g and theta theta = 0:pi/100:2*pi; % ...

3年以上 前 | 0

回答済み
Simulink Port Dimensions Error
M = A.*T + B*Y %

3年以上 前 | 0

回答済み
What is wrong here? The equation of a circle given its center
syms x y R e1=(x+1)^2+(y-3.2)^2==R^2; e2=(x+8)^2+(y-4)^2==R^2; e3=(x+6.5)^2+(y+9.3)^2==R^2; result=solve([e1,e2,e3],[x y R])...

3年以上 前 | 0

| 採用済み

回答済み
Animate results from PDE toolbox
M(:,i) = getframe(gcf); % use gcf

3年以上 前 | 0

| 採用済み

回答済み
how to assign the service time value of the first entity server to the second entity server?
You can try by putting an additional *entity* block between first server and second server. Assign the output of first server to...

3年以上 前 | 0

回答済み
Repeat resampling with replacement process several times
res1 = []; res2 = []; centered = rand(170,7) % centerd matrix size:2X7 % cen1=centered(1,:); % cen2=centered(2,:); fo...

3年以上 前 | 0

| 採用済み

回答済み
Why does this code not work?
D =90 ; V = 6.672408424 ; mean_D = 90 ; mean_V = 6.6724 ; sigma_D = 10.29023 ; sigma_V = 0.67708 ; %Now use normrnd functi...

3年以上 前 | 0

回答済み
Why is there extra data in my graph?
x =fig.eventsTOP.Event_Type; y = fig.eventsTOP.GroupCount; % bar(x,y)

3年以上 前 | 0

回答済み
How to remove a value from a vector in a for loop?
K = setdiff(randi([1 N]),[k]);

3年以上 前 | 1

回答済み
how to find out that the length is odd or even
R = 0:0.1:9.1; % example with n = length(R) while 1 % will check the values from 1 to n Nodd = (-1)^n; ...

3年以上 前 | 0

| 採用済み

回答済み
Index exceeds the number of array elements. Index must not exceed 1 error
This function is not returning all Ten variables as defined by fucntion output [TS1,TS2,TS3,TA1,TA2,TA3,H1,H2,H3,area] func...

3年以上 前 | 0

| 採用済み

回答済み
How do I fix the particular error code that I was given for my code?
generateReport(allHurricaneData) % are you calling structure in this way in main script or generateReport(HurricaneData) % ...

3年以上 前 | 0

回答済み
solving non linear equations
fc(:,i+1)=subs(fc,[x;y;z],xn) jc(:,i+1)=subs(jc,[x;y;z],xn)

3年以上 前 | 0

回答済み
How to put a variable in a legend without it being in the range of the plot?
slope = 3; x = 1:5; y = 6:10; a = 11:15; b = 16:20; slopestr = sprintf('slope is %f',slope) figure(1); plot(x,y); hold o...

3年以上 前 | 0

回答済み
Partial derivative with respect to x^2
syms x y z t f= (x^5*y^3+ z^2*x^2+y*x) / (x^3*y+x*y) % t = x^2 % assume x = sqrt(t) F = subs(f,x,sqrt(t)) y = diff(F,t) Y...

3年以上 前 | 0

回答済み
access nested struct from excel to matlab
myStruct.d = rand(1,10); % struct with data Par1 = {myStruct}; % nested in cell Data = Par1{1}.d % access data

3年以上 前 | 1

回答済み
Output of one table as a value into a new table
TableB.group(j-1,:) = sum(TableA.group(j)); As the error states use *table* as above instead of array

3年以上 前 | 0

| 採用済み

回答済み
user function and plot
May be this change, with regards to returning output variables x1 and x2 since function is not returning both variables as writt...

3年以上 前 | 0

| 採用済み

さらに読み込む