回答済み
Plot temperature Mean vs time
Use the . symbol to access the variables and markers since you are plotting scalars in the for loop plot(dataStruct.Mean,dataSt...

3年以上 前 | 0

回答済み
error: Unable to perform assignment because the size of the left side is 1-by-49 and the size of the right side is 1-by-51 at line 23, where is the problem?
T(Nx,2:Ny-1) = TR(2:Ny-1); T(2:Nx-1,1) = TB(2:Nx-1).'; Vectors TR and TB are of different sizes

3年以上 前 | 0

| 採用済み

回答済み
The stem plot is not shown in the figure
t = 0:0.01:2; % sample points from 0 to 2 in steps of 0.01 xt = sin(2*pi*t); % Evaluate sin(2 pi t) subplot(2,1,1); % Two r...

3年以上 前 | 0

| 採用済み

回答済み
Plotting 2 arrays as bar charts with adjacent bars
A = rand(1,8); B = rand(1,8); bar([1 2 3 4 5 6 7 8],[A;B]); % use concatenation

3年以上 前 | 0

| 採用済み

回答済み
How to use a variable from one for loop in another for loop?
R = [ElmtCentre(:,i);0];

3年以上 前 | 1

| 採用済み

回答済み
plot with two y axis matlab - same axis at 0
yyaxis left plot(Time,LimitedVoltage,'LineWidth',3.0) ylabel("Voltage [V]","FontSize",30,"FontName","Times") ylim([0 10]) % ...

3年以上 前 | 0

回答済み
How to fix error using horzcat when trying to display?
try with sprintf a = [-3.821; 0.135; 5.995; -5.557; -4.041; -3.094; -3.244; -3.074; -1.241; -4.216; -2.834; -0.424; 5.337; -0....

3年以上 前 | 0

回答済み
How to mean data of second column with respect to the similar element in the first column
This is one approach D(:,1) = [zeros(6,1); ones(6,1)*0.01667; ones(6,1)*0.05]; D(:,2) = rand(length(D),1); o = unique(D(:...

3年以上 前 | 0

回答済み
Index in position 1 exceeds array bounds. Index must not exceed 1.
% intializing the constants m = 20; k = 20; x0 = 1; v0 = 0; t_span = (0:.1:15) initalCon = [t_span(1) , x0 , v0]; % Time ,...

3年以上 前 | 0

| 採用済み

回答済み
plot a uniform flow
[x,y] = meshgrid(0:0.1:5,0:0.1:5); alpha =10; U=1; startx = 0.1:0.1:5; starty = ones(size(startx)); for i =1:length(x) ...

3年以上 前 | 0

| 採用済み

回答済み
Plotting a given function over an interval
syms x y1 = (x.^5) - (6.13*x.^2) - (0.83*x) - (0.62 ./ (x.^2 + 0.0825)) + 5.2; fplot(y1,[-1.5 1.5]) % range of values

3年以上 前 | 0

回答済み
I have plotted the stress strain graph from the tensile experiment and now I want to find the young's modulus of elasticity,yield point and yield stress
T=readmatrix('tensile1_270_23.txt'); D=T(:,1); F=T(:,2)*1000; B=25; A=(12.6*4.1); strain=(D/B)+3.1710e-05; stress=F/A+1.78...

3年以上 前 | 0

回答済み
unable to proceed multiplication of vectors and also use for loop
clc; clear; close all; % hermite matrix H = [2 -2 1 1;-3 3 -2 -1;0 0 1 0;1 0 0 0] % hermite segment between A(0,0) and B(1,2)...

3年以上 前 | 0

回答済み
Relation between depths and thicknesses
syms z1 z2 z3 z4 z5 t = [31 27 52 268]; % known thicknesses eq1 = z1; eq2 = z2 == z1 + t(1); eq3 = z3 == z2 + t(2); eq4 =...

3年以上 前 | 0

回答済み
how can I do subtraction between two symbolic functions with different arguments?
syms X(alpha,beta) syms Y(theta) eqn = X(alpha,beta)-Y(theta) % define symvars for X and Y

3年以上 前 | 0

回答済み
Help with Legend for Plot
clc; % Clear the command window. close all; filename = 'amplitudeT1cleaned.xlsx'; data = readtable(filename); VN =...

3年以上 前 | 0

回答済み
i am trying to run my code with different L values, which changes the k values running them through the same function, generating Omega 1,2,3 for each L which I can plot .
keq=(3*E*Im)./(L.^3); You can use element wise division for all values of L

3年以上 前 | 0

| 採用済み

回答済み
how to Insert cell array into a cell?
%INPUT A = {'one''two''three'}; B = {A,'four''five''six'};

3年以上 前 | 1

| 採用済み

回答済み
I’m trying to find the resultant matrix z=R^-1*S but it keeps saying “array indices must be positive integers… how can I solve it?
R= [1 0 0 4 1; 2 -2 0 1 -1; 0 4 1 -3 0; 1 -1 2 2 1; 3 2 5 0 1]; S= [11;-7;3;-17;5]; Z=inv(R).*S

3年以上 前 | 0

回答済み
How to store output from for loop to a table
v = 100; g = -10; counter = -1; loops = 19; m = zeros(20,2); while counter <= loops counter = counter + 1; t = co...

3年以上 前 | 0

| 採用済み

回答済み
How to reset time to zero at the change of one value
B = 1; % usual input B value if cyc == 0 B = 3; % input a different B value when cyc = 0 y = myFun(B) time = 0...

3年以上 前 | 0

| 採用済み

回答済み
VST Code generation issues with element-wise multiplication
gains = [0.5, 0.725]; in = rand(8) out = [in(:,1) * gains(1), in(:,2) * gains(2)] out = in .* gains % check the matrix multi...

3年以上 前 | 0

回答済み
How to fit a defined function?
To define *a* and then call in function

3年以上 前 | 1

回答済み
I am modelling a PI controller for DC motor using TIF28027F & DRV8x motor driver. I want to know how can I see the intermediate signal values (marked in red) in MATLAB or CCS?
you can add a scope block to visualize data from the signal outputs in form of graphs. Chech more info below https://in.mathwo...

3年以上 前 | 0

回答済み
How to add Zero after an integer value?
Use format long

3年以上 前 | 0

回答済み
Storing array of values from for loop
results(:,run)=[time(run); volmean(run)]; % change plot(results) % after for loop

3年以上 前 | 0

回答済み
Code gets stuck when generating third set of plots in a for loop
clc clear format long % global Pr ddf = 1; dtheta = -1; span = [0 10]; % Increments da = 1e-4; db = 1e-4; % B...

3年以上 前 | 0

回答済み
Why am I receiving these errors? (Error using symfun/subsindex, Error in indexing (line 1079))
syms y(t) d1y = diff(y,1) d2y = diff(y,2) eq1 = .588*(6.86-9.8*sin(y(t))) == d2y; [F,S] = odeToVectorField(eq1) ode...

3年以上 前 | 0

回答済み
Looping with two vectors ?
V = (pi*yq(3002:10001)/3 .* (xq(3002:10001).^2 + xq(3002:10001)*3 + 9); May be you can just vectorize the equation with giv...

3年以上 前 | 0

回答済み
No Arrows showing in plot When using quiver
[X,Y]=meshgrid(linspace(-2.5,2.5,10)); Ur=1+((Y-X)/2.5)-((X.*Y)/2.5^2); for i=1:size(X,1) for j=1:size(X,1) ...

3年以上 前 | 0

| 採用済み

さらに読み込む