
VBBV
PEC
Programming in MATLAB applied to interdisciplinary engineering fields
Content Feed
답변 있음
Why does this code fail?
fid = fopen('for1234.dat','w+'); fclose(fid) Since you are writing the data repeatedly to the same file, place the above f...
Why does this code fail?
fid = fopen('for1234.dat','w+'); fclose(fid) Since you are writing the data repeatedly to the same file, place the above f...
2일 전 | 0
답변 있음
plot using matlab(parabolic)
x = linspace(0.1,5,100); % may be parabolic y = 0.453 .* exp(-1.036 .* x) .* sinh((2.29.* x).^0.5); plot(x,y); Parabolic p...
plot using matlab(parabolic)
x = linspace(0.1,5,100); % may be parabolic y = 0.453 .* exp(-1.036 .* x) .* sinh((2.29.* x).^0.5); plot(x,y); Parabolic p...
2일 전 | 0
답변 있음
How to prepare extract monthly Data from a group of data?
A = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1272440/AO_1950_2022.xlsx'); A.Properties.Variable...
How to prepare extract monthly Data from a group of data?
A = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1272440/AO_1950_2022.xlsx'); A.Properties.Variable...
3일 전 | 0
| 수락됨
답변 있음
'Index in position 1 is invalid. Array indices must be positive integers or logical values.', error in line 14 i.e., t1=D(ax(i),ay(i)).
clc clear all syms x y f=x*y^2;%input('enter the function:') p=diff(f,x); q=diff(f,y); [ax,ay]=solve([p,q],[x y]); ax=do...
'Index in position 1 is invalid. Array indices must be positive integers or logical values.', error in line 14 i.e., t1=D(ax(i),ay(i)).
clc clear all syms x y f=x*y^2;%input('enter the function:') p=diff(f,x); q=diff(f,y); [ax,ay]=solve([p,q],[x y]); ax=do...
4일 전 | 0
답변 있음
add constant value to row
A=readmatrix('DATA.xlsx'); % assuming DATA your filename A(:,end+1)=600; writematrix(A,'DATA.xlsx','Delimiter','tab') % writ...
add constant value to row
A=readmatrix('DATA.xlsx'); % assuming DATA your filename A(:,end+1)=600; writematrix(A,'DATA.xlsx','Delimiter','tab') % writ...
5일 전 | 0
답변 있음
How to interpolate a set of data wher the X size is different for the Y size
Y=[1:14].';% 1 x 14 X=[1:2:5].'; % 1 x 3 Z=rand(14,3); % 14 x 3 [xq,yq]=meshgrid(1:0.0005:5,1:0.0005:14); % ...
How to interpolate a set of data wher the X size is different for the Y size
Y=[1:14].';% 1 x 14 X=[1:2:5].'; % 1 x 3 Z=rand(14,3); % 14 x 3 [xq,yq]=meshgrid(1:0.0005:5,1:0.0005:14); % ...
6일 전 | 0
답변 있음
i want to plot the graph for while loop but the graph was blank
t(d)= t+h; %update T0 T0(d)= newT0;
i want to plot the graph for while loop but the graph was blank
t(d)= t+h; %update T0 T0(d)= newT0;
6일 전 | 0
답변 있음
How to create a vector that repeats 5 values per increment in a for loop?
x = zeros(1,5); for ii=100:50:1000 x = [x ones(1,5)*ii]; end x(x==0) = []
How to create a vector that repeats 5 values per increment in a for loop?
x = zeros(1,5); for ii=100:50:1000 x = [x ones(1,5)*ii]; end x(x==0) = []
7일 전 | 0
| 수락됨
답변 있음
how to get no of samples?
format long % this will explain why there are 298 samples a=1:10; no_samples=(10-1)/(10-1) %have to get 10 samples g=1:no...
how to get no of samples?
format long % this will explain why there are 298 samples a=1:10; no_samples=(10-1)/(10-1) %have to get 10 samples g=1:no...
8일 전 | 0
답변 있음
Connecting two Matlab scripts under one loop
A=100*rand(10,1); %input('enter wind speed mean\n'); %first part a = numel(A(A<0)); b = numel(A(A>10)); S = a+b; N = n...
Connecting two Matlab scripts under one loop
A=100*rand(10,1); %input('enter wind speed mean\n'); %first part a = numel(A(A<0)); b = numel(A(A>10)); S = a+b; N = n...
8일 전 | 0
| 수락됨
답변 있음
Next value in alphabet
p = 'a' % e.g. user enters input letter nextLetter(p) % output of nextLetter function [next] = nextLetter(p) Alphabet = {'...
Next value in alphabet
p = 'a' % e.g. user enters input letter nextLetter(p) % output of nextLetter function [next] = nextLetter(p) Alphabet = {'...
9일 전 | 0
답변 있음
Sound absorption coefficient of membrane backed with air cavity
clc clear all; f= (100:2:1600); omega= 2*pi*f; rho_s=0.265; T=76.53*(1+1j*0.005); D=0.1; a=0.05; % Fig 2 a c=343; rh...
Sound absorption coefficient of membrane backed with air cavity
clc clear all; f= (100:2:1600); omega= 2*pi*f; rho_s=0.265; T=76.53*(1+1j*0.005); D=0.1; a=0.05; % Fig 2 a c=343; rh...
10일 전 | 0
| 수락됨
답변 있음
convert matrix steps from 1 to 0.1
If you are plotting 0 to 0.1 sec using 1000 data points, the you have to divide it by frequency, 10 kHz data./10000 I...
convert matrix steps from 1 to 0.1
If you are plotting 0 to 0.1 sec using 1000 data points, the you have to divide it by frequency, 10 kHz data./10000 I...
13일 전 | 0
답변 있음
Unrecognized function or variable 'zvar'.
xlabel('xvar') ylabel('yvar') xlabel('zvar') If zvar, yvar and xvar are strings or numeric values passed to function ...
Unrecognized function or variable 'zvar'.
xlabel('xvar') ylabel('yvar') xlabel('zvar') If zvar, yvar and xvar are strings or numeric values passed to function ...
13일 전 | 0
답변 있음
Got this ''Empty sym: 0-by-1''
syms x; q = 1:3; w = 2; for k = 1:length(q) eqn = (3*x) + q(k) + w == 0; sol = solve(eqn,x); S(k) = double(vpa(sol,2)) ...
Got this ''Empty sym: 0-by-1''
syms x; q = 1:3; w = 2; for k = 1:length(q) eqn = (3*x) + q(k) + w == 0; sol = solve(eqn,x); S(k) = double(vpa(sol,2)) ...
14일 전 | 0
답변 있음
One condition is not being fulfilled, and suddenly when i wrote on command window, give me a infinite menu, and i can not close it
clc, clear, close while true a=menu({'This program allows the fitting of functions to experimental points.', ... ...
One condition is not being fulfilled, and suddenly when i wrote on command window, give me a infinite menu, and i can not close it
clc, clear, close while true a=menu({'This program allows the fitting of functions to experimental points.', ... ...
15일 전 | 1
| 수락됨
답변 있음
how to solve one variable in non linear equation?
clc clear all T=12; u1=400;u2=8;a=30;b=5;a2=100;A=500;c2=10;c3=12;c4=8;D0=115; b2=0.2; a=-1.1;d=11.2;m=-0.5;k1=1.5;k0=1.1;k2=...
how to solve one variable in non linear equation?
clc clear all T=12; u1=400;u2=8;a=30;b=5;a2=100;A=500;c2=10;c3=12;c4=8;D0=115; b2=0.2; a=-1.1;d=11.2;m=-0.5;k1=1.5;k0=1.1;k2=...
15일 전 | 0
답변 있음
How to create a loop?
clear all clc format longG; format compact; txt = input ('Choose a Production Period: 1) Annual 2) Monthly 3) Weekly 4) Dail...
How to create a loop?
clear all clc format longG; format compact; txt = input ('Choose a Production Period: 1) Annual 2) Monthly 3) Weekly 4) Dail...
15일 전 | 0
답변 있음
generate and save numerous datas in one code then load them in another code
% in A.m file [p,q] = B % call the function wbich returns those outputs variables (values) n = p + q % add them directly as...
generate and save numerous datas in one code then load them in another code
% in A.m file [p,q] = B % call the function wbich returns those outputs variables (values) n = p + q % add them directly as...
17일 전 | 0
답변 있음
Precision of rounding numbers
D = 1/(0.1*0.00001) fprintf('%.2d',D) % try using %d format specifier As you are using %f it is meant for floatpoint num...
Precision of rounding numbers
D = 1/(0.1*0.00001) fprintf('%.2d',D) % try using %d format specifier As you are using %f it is meant for floatpoint num...
17일 전 | 0
답변 있음
Open an "array" of filenames
Its possible to open multiple files as you intend. Use the sprintf function to open individual filenames identified using an in...
Open an "array" of filenames
Its possible to open multiple files as you intend. Use the sprintf function to open individual filenames identified using an in...
17일 전 | 0
답변 있음
Char not working properly ?
To display text on figure window, you should rather use uilabel function in place of uitextarea which produces same output as de...
Char not working properly ?
To display text on figure window, you should rather use uilabel function in place of uitextarea which produces same output as de...
18일 전 | 0
답변 있음
During matching process I want distinct Number but I am getting same number for few data set. Is there any command to get distinctive number always.
Use *unique* function.
During matching process I want distinct Number but I am getting same number for few data set. Is there any command to get distinctive number always.
Use *unique* function.
18일 전 | 0
답변 있음
Where is the mistake? Taylor Series in matlab?
syms T alpha = 0.056; beta = 0.0000186; R = 2000; f = R*(alpha+0.0078*(T-25)+beta*(T-25).^2); f = subs(f,T,80); tayl...
Where is the mistake? Taylor Series in matlab?
syms T alpha = 0.056; beta = 0.0000186; R = 2000; f = R*(alpha+0.0078*(T-25)+beta*(T-25).^2); f = subs(f,T,80); tayl...
21일 전 | 0
| 수락됨
답변 있음
My simulation doesn't take into account the different height of the Faraday waves?
% Define physical parameters g = 9.81; % acceleration due to gravity d = 0.1; % fluid depth omega = 0.1; % forcing frequency ...
My simulation doesn't take into account the different height of the Faraday waves?
% Define physical parameters g = 9.81; % acceleration due to gravity d = 0.1; % fluid depth omega = 0.1; % forcing frequency ...
21일 전 | 0
| 수락됨
답변 있음
Loop through multiple columns in table using if condition
X.A = [randi([0 10],1,7) NaN] X.B = repmat(NaN,1,8); for i = 1:length(X.A) if (isnan(X.A(i)) & isnan(X.B(i))) ...
Loop through multiple columns in table using if condition
X.A = [randi([0 10],1,7) NaN] X.B = repmat(NaN,1,8); for i = 1:length(X.A) if (isnan(X.A(i)) & isnan(X.B(i))) ...
21일 전 | 0
| 수락됨
답변 있음
Iteration of writing videos
Place the below line close(cutvideo) Outside of the outer _for loop_ with index _k_.
Iteration of writing videos
Place the below line close(cutvideo) Outside of the outer _for loop_ with index _k_.
21일 전 | 0
답변 있음
I keep getting this for my function and I don't know how to fix it -- Undefined function 'symsum' for input arguments of type 'double'.
format long N = [5 10 50]; Phi = prob2_6(N) % call function by passing vector of values with range N function phi = prob2_...
I keep getting this for my function and I don't know how to fix it -- Undefined function 'symsum' for input arguments of type 'double'.
format long N = [5 10 50]; Phi = prob2_6(N) % call function by passing vector of values with range N function phi = prob2_...
22일 전 | 0