回答済み
How do I solve this ?
n = 0:1:100; % n range syms x E = @(n) (x.^n)./(factorial(n)); fplot(sum(E(n)),[1 10]) hold on plot(exp(1:10)) legend('Su...

3年以上 前 | 0

回答済み
Integration limit is an array
syms x tau=35*10^-15; f=tau.*exp(-x.^(2)); t=linspace(-300*10^-15,300*10^-15,500); fun=matlabFunction(f,'Vars',x) for k = 1...

3年以上 前 | 0

| 採用済み

回答済み
How to write a for loop to generate a new set of initial conditions based on a input value that changes over different time intervals.
% Set the initial values A = 1; B = 1; C = 1; D = 1; % % Input = 1; % Set the model parameters k1 = 1; k2 = 3; k3 = 2;...

3年以上 前 | 1

回答済み
I do not get how am I getting Index in position 3 is invalid. Array indices must be positive integers or logical values. in code attached.
for t = dt:dt:tf % this is source b(idx) = T(i,j,t); this is cause Matlab uses 1 based array indexing. t is assigned deci...

3年以上 前 | 0

回答済み
how to append my data?
D = [1 1 2 1 2 2 2 3 3 4 4 5 5 6 6 6] D = reshape(D,[],1)

3年以上 前 | 1

回答済み
Rearrange symbolic variables in equation
syms a b c ; eqn = a/b == (c-3); S = solve(eqn,[ a,b,c])

3年以上 前 | 0

回答済み
How to plot the figure in LT?
x=[0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24]; y=[0.2;0.3;0.4;0.2;0.7;0.4;0.6;0.3;0.2;0.4;0.2;0.4;0.6...

3年以上 前 | 0

| 採用済み

回答済み
Ode solver, how to pass V=0:0.1:1 used in the differential equations
This is one way clearvars y0=[0;0;1;0;0;1;1]; V=0:0.1:1; for k = 1:length(V) [t, y] = ode45(@(t,y) ff_corr(t,y,V(k)),[0...

3年以上 前 | 0

回答済み
How to extract date, month, year, and time from a table data?
A = string({'2016-01-09 00:30:00';'2017-05-10 01:00:00'}); At = table(A,'VariableNames',{'Time'}); for k = 1:length(At.Time) ...

3年以上 前 | 0

回答済み
How can I show the value on bars
X = categorical({'roiA','roiB','roiC','roiD', 'roiE'}); Y = [44 66 23 56 54;5 6 4 5 3 ]; b = bar(X,Y); x = b(1).XEndPoint...

3年以上 前 | 0

| 採用済み

回答済み
Attempted to access Son(0.000673333); index must be a positive integer or logical.
Is _Son_ is an array, then it's reason why you get that error. Matlab uses 1 based indexing for numeric arrays.

3年以上 前 | 0

回答済み
It keeps saying "Index exceeds the number of array elements. Index must not exceed 2."
if error_x(i+1)<=0.1&&error_y(i+1)<=0.1 break else x(i+1)=x(i); y(i+1)=y(i); end

3年以上 前 | 0

回答済み
How to remove zeros from double value?
format shortG D = [0.2352 0.5263] D = round(D(:),3) - [0.005 0.006].'

3年以上 前 | 1

回答済み
How to determine phase angle of an AC voltage?
Z is impedance. And calculated using following expression. Z = R+jX ; Where X is the reactance obtained as resultant ...

3年以上 前 | 0

回答済み
How do I draw circles in App Designer with user inputting the x, y and radii values?
In the app designer, you can invoke the follwing code, % in the app designer prompt = {'Enter radius of circle:', 'Enter cen...

3年以上 前 | 0

回答済み
Download all hours of all days of the year from CMORPH
Note the following changes clc clearvars % Download the CPC data used in the script below which_years = (2000:2005); % ye...

3年以上 前 | 0

回答済み
Time-dependent derivatives of a function with vector-valued components
instead of using sym use syms for defining vector valued functions with multple variables, e.g. x and t syms 'x(t)' [1 3] x

3年以上 前 | 1

回答済み
Gradient of vector-valued function
use diff instead of gradient which is equivalent for gradient operation for symbolic expressions syms a b1 b2 t mfcn = matlab...

3年以上 前 | 0

回答済み
Different size definition in Matlab and Simulink
It seems you are accessing 2 elements of array *data* with each representing 4 byte register address. Each element of which has ...

3年以上 前 | 0

回答済み
any idea how i can compute the elapsed time in each iteration in for loop ?
Read about commands *tic* and *toc*

3年以上 前 | 0

| 採用済み

回答済み
Hi, I'm new to this forum and appreciate very much your help! How to separate the results in for-loop?
clc clear A = 5; k = 1 for pe=[1 5 7 9] n(k)=pe*1.5; C(k)=n(k)*A;k = k+1; end

3年以上 前 | 0

回答済み
Is it possible to only plot specific graph in a for loop?
t = 0:0.01:2*pi x = [3 7 8]; for k =1:length( [3 7 8]) y(k,:) = sin(t.*x(k)); end plot(t,y) legend('x = 3','x =7','x=8')...

3年以上 前 | 1

| 採用済み

回答済み
How to store the existing value in a array format. Here I have given the charging and discharging limits but it does not check it properly. can anyone help me to sort out this
f_SOC(i) = i_soc-(pevdchg*(i))/cev*100 %soc discharging equation May be you mean i_soc instead of temp in discharging cycl...

3年以上 前 | 0

回答済み
why do i get an error in my code?
TT = load("stormData"); Load the data into variable nd use it in groupsummary summaryRegionCosts= groupsummary(TT, "...

3年以上 前 | 1

回答済み
Kindly help me with this problem of groupsummary
TT = load("stormData"); summaryRegionCosts = groupsummary(TT, 'Region',{"min","max","median","mean"} , 'Total_Cost'); storm...

3年以上 前 | 0

回答済み
Nested For Loop/Newton Raphson
x0 = 1.5; %x0 represents Mach Number Initial Guess AR = [1.8652 1.5472 1.3327 1.1793 1.0827 1.0258 1.0016 1.0302 1.1091 1.189...

3年以上 前 | 1

回答済み
multiplication of matrices with different sizes
Use a cell array for s s{m}=(inv(C*o).*o.*PC.*inv(C.*o).*C);

3年以上 前 | 0

回答済み
I can keep getting this error. Index exceeds the number of array elements. Index must not exceed 1.
t = zeros(1,t_reach); %hr X = zeros(1,t_reach); S = zeros(1,t_reach); P = zeros(1,t_reach); V = zeros(1,t_reach); Sa...

3年以上 前 | 0

回答済み
How to convert das decimal number to binary code and directly write into matrix columns?
D = [0 4 3 7 2 5 6 7] F = dec2bin(D) % dec2bin use dec2bin function

3年以上 前 | 0

さらに読み込む