回答済み
How can I change the Nan values in a matrix by the values in cells array?
f(pt) = cell2mat(data) Use cell2mat

3年以上 前 | 0

| 採用済み

回答済み
plot multiple vertical line on the same graph
Y = rand(100,32); Y = Y ./ max(abs(Y), [], 1); % Divide by maximum value. Then all values are between -1 and 1 Y = Y + (1:100...

3年以上 前 | 0

回答済み
"Unable to perform assignment because the indices on the left side are not compatible with the size of the right side"
P_pv = zeros(M,T); E =zeros(M,T); E_SOC = zeros(M,T); K = zeros(M,T); K_SOC = zeros(M,T); P_LD = zeros(M,T);

3年以上 前 | 0

| 採用済み

回答済み
Plot sum of series/heat distribution
clc; clear all; close all; % syms x t n % Given Value L = 0.008; T0 = 700; T1 = 373; alpha = 5.2 * 10^-7; x = L/...

3年以上 前 | 1

| 採用済み

回答済み
solve double differentiation with two limits
clc; close; clear; syms d_F ; syms d_F_c; syms dM_B; %syms Theta_B; syms x real; syms u_mid; syms u_c; syms u_max; sy...

3年以上 前 | 0

| 採用済み

回答済み
Save Variable in for Loop
K = 1 % place this outside the for loop while errVec(2) < 200 && errVec(3) < 1e7 % Generate a 1000-symbol frame ...

3年以上 前 | 0

| 採用済み

回答済み
right y-axis
X = rand(20,1); Y = X.^2 + 4; Y1 = Y./2; plot(X,Y); yyaxis right % use this as 2nd yaxis with ref to 1st plot(X...

3年以上 前 | 0

回答済み
Non trivial solution to a linear system
syms omega2 K = rand(5); M = rand(5); eigF = 0.1; % scalar eqn1 = det(K-omega2*M) == 0; eigenfreq1=vpasolve(eqn1,omega2) e...

3年以上 前 | 0

| 採用済み

回答済み
Solution of equation and graph with matlab
syms F2(x) x y F2 = x + (800*1e4)/(2*x*y) + 250*y; sol = solve(F2,[x y]); sol.x sol.y fimplicit(F2,[-50 10 -50 50])

3年以上 前 | 0

回答済み
IF statement not generating results?
data=load('artificial_slope.txt') %loading data % defining input values based of input txt file nx = data(:,4); ny = data(:,...

3年以上 前 | 0

| 採用済み

回答済み
how to save the values of DelL(T)
Lo = 44.46 Do = 18.76 alpha = 0.0002178 for T = 36:1:180 DeltaL = Lo*alpha*(T-35); DelL(T) = DeltaL; end DelL(DelL ...

3年以上 前 | 0

回答済み
Why I can't run this coding?
syms q1(t) t %q1(t) h=q1 q1_of_t=symfun('q1(t)',t) h1=subs(h,q1,q1_of_t) %diff q1(t),diff twice q1(t) diff_q1t=diff(h1,t...

3年以上 前 | 0

| 採用済み

回答済み
i am getting this error for conv 2d please help me
i=imread("peppers.png") imshow(i) i_i=im2double(i); k=ones(4,4)/16; b=0; % this is key parameter to check ni = conv2d(i_i...

3年以上 前 | 0

回答済み
what to do in this case?
fplot (@(x, y) x.^3.*y-2.*x.*y.^2+y-0.2,[0, 1, 0, 1]); Give the values of y range just like x

3年以上 前 | 0

| 採用済み

回答済み
Text size in figure relative to figure window
FB_text_ = text(6,2,FB_Instruction,'FontUnits','normalized','FontSize',25)

3年以上 前 | 1

| 採用済み

回答済み
Appending data to end of column in Table (for Loop)
T{i} = readtable(filename,'Range',range,'ReadVariableNames',false); You can use cell arrays instead

3年以上 前 | 0

| 採用済み

回答済み
How do I plot a diagonal line in MATLAB?
clc clear all %%Given Parameters for a GA Acrobatic Aircraft M = 2300; S = 19.33; C_Lmax = 2; C_Lmaxneg = -1.2; AR = 7...

3年以上 前 | 0

| 採用済み

回答済み
How to match two y axes of the yyaxis , so that their 0 points are aligned
T_in = timeseries((T_pedal),(t_pedal)); figure (2) yyaxis left plot(t_pedal,T_pedal,'y'); hold on t_tar_mot = Trip.Data.S...

3年以上 前 | 0

| 採用済み

回答済み
how can i sum the 'y' above in the picture i have polt ?
y = 0; for x = -2:0.001:2; y = y + 1.8*exp(-x.^2); plot(x,y,'bo','Markersize',1) hold on end y

3年以上 前 | 0

回答済み
plotting y-axis issue and wrong plot
subplot(3,1,3) hold on for m=linspace(0,1000,11) a=linspace(20,220,1000); M=linspace(0,1000,1000); f=M.*a;. %...

3年以上 前 | 0

| 採用済み

回答済み
Combining columns in a table into comma separated values while skipping NaN
currTable{jj} = strcat(num2str(currTable.Var3(jj)),',',num2str(currTable.Var4(jj))); If you use cell arrays it becomes easi...

3年以上 前 | 0

回答済み
problem with Read excel file
You can try using a *readmatrix* function. <https://in.mathworks.com/help/matlab/ref/readmatrix.html>

3年以上 前 | 0

回答済み
Implementing a markov chain for a probability dependent random walk
for n = 1-n0 :2: n0-1

3年以上 前 | 0

回答済み
Store a values in to a table at each iteration of loop
clear all close all v1=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]; Fs=12000; %sampling frequency T=1/Fs; %samplin...

3年以上 前 | 0

回答済み
Can anyone explain why I'm getting this error?
omega=3*pi/2 There is missing multiplication operator

3年以上 前 | 0

回答済み
Plot two sets of data in one plot (different Time vs Temp data sets)
% figure('WindowState','maximized'); x1 = 1:10; A1 = rand(10,1); x2 = 1:10; A4 = rand(10,1); plot(x1, A1, 'LineWidth', 1)...

3年以上 前 | 0

回答済み
how to plot the exponential fourier series in matlab?
% (a)plot x(t) over a time interval (0,3) clear;clc t = 0:0.01:3; % total simulation time x = exp(-t); plot(t,x,'r','LineWid...

3年以上 前 | 0

| 採用済み

回答済み
How to shift collum of matrix to the right ?
A = eye(10) A = circshift(A(3,:),1) You can use circshift function to shift position of zeros in the matrix as above

3年以上 前 | 0

回答済み
How to use for loop to count?
patient_ages = [15 8 6 12 16 3 18 12 13 9 8 15 5 2] over12 = 0 for i=1:length(patient_ages) if patient_ages(i) > 12 ...

3年以上 前 | 0

| 採用済み

さらに読み込む