Answered
Error: "filename" must be a string scalar or character vector.
subDir = 'DataFile\'; Change this line as above.

4 years ago | 0

Answered
Understanding how to apply for loop ?
SNR1 = rand(1,100).'; % the vector with SNR1 values SNR3 = rand(1,100).';% the vector with SNR3 values I = randi([1 100],[1 10...

4 years ago | 0

Answered
How to perform functions on txt files
height1 = ((B)./(log(P./rinf)))-273.15

4 years ago | 0

| accepted

Answered
MATLAB double addition format long
format long x = 14.1 % x = 0.1 x = 14.1 + 0.1 % when you include + operator When a mathematical operator /computation ...

4 years ago | 0

Answered
MATLAB App Designer: How to display a scatter plot on the UIaxes with linear fit and equation of line ?
str = [107.0176, 256.7374, 257.2012, 441.7806, 420.5170, 602.7027, 591.8610, 756.6289, 896.9324]; Ec1 = [23.8829, 19....

4 years ago | 0

Answered
Too many Input arguments error
clear syms x %Givens v=300; %(m/s), Value based on user input g=9.81; %m/s^2), Constant h=4; %(m) starting launch height t...

4 years ago | 0

Answered
How to add line into an array
A = [1:10 , 15: 30];% your data R = [A(1:10), zeros(1,4), A(11:end)]

4 years ago | 0

| accepted

Answered
While playing code, finding following error.
f = @(x1,x2)((x1).^2+2*(x2).^2-4*(x1)-2*(x1.*x2))

4 years ago | 0

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

4 years ago | 0

| accepted

Answered
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...

4 years ago | 0

Answered
"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);

4 years ago | 0

| accepted

Answered
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/...

4 years ago | 1

| accepted

Answered
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...

4 years ago | 0

| accepted

Answered
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 ...

4 years ago | 0

| accepted

Answered
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...

4 years ago | 0

Answered
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...

4 years ago | 0

| accepted

Answered
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])

4 years ago | 0

Answered
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(:,...

4 years ago | 0

| accepted

Answered
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 ...

4 years ago | 0

Answered
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...

4 years ago | 0

| accepted

Answered
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...

4 years ago | 0

Answered
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

4 years ago | 0

| accepted

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

4 years ago | 1

| accepted

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

4 years ago | 0

| accepted

Answered
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...

4 years ago | 0

| accepted

Answered
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...

4 years ago | 0

| accepted

Answered
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

4 years ago | 0

Answered
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;. %...

4 years ago | 0

| accepted

Answered
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...

4 years ago | 0

Load more