# VBBV

### PEC

Programming in MATLAB applied to interdisciplinary engineering fields

**Statistics**

RANK**97**

of 243,800

REPUTATION**1,032**

CONTRIBUTIONS

**23** Questions

**763** Answers

ANSWER ACCEPTANCE **
86.96%
**

VOTES RECEIVED**98**

RANK**5,508** of 17,054

REPUTATION**187**

AVERAGE RATING**3.00**

CONTRIBUTIONS**12** Files

DOWNLOADS **50**

ALL TIME DOWNLOADS**1823**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Plot a function of three variable

f = @(x,y,z) x.^2+y.^2+z.^2-3*x.*y.*z ; x = linspace(-1,1) ; y = linspace(-1,1) ; z = linspace(-1,1) ; [X,Y,Z] = ndgrid(x,y,...

2 days ago | 0

Move colorbar location to the east in tiled layout figure

t = tiledlayout(2,3) t.Tilespacing = 'compact' Try also this

2 days ago | 0

Error in nexttile after adding colorbar for whole tiledlayout

f = figure; t = tiledlayout(f, 'flow'); nexttile %adding any two plots plot(1:100) nexttile plot(1:100) cb = colorbar; %ad...

2 days ago | 0

plot the probability distribution from Schrodinger Equation

n=1; a=1; x = linspace(0,0.01,10); % change the number of points to 10 y = linspace(0,0.01,10); z = linspace(0,0.01,10); ...

5 days ago | 0

i have a problem with my plot, i am not getting any values and the system gives me an empty plot.

a = 0.5; % perhaps this i0H2 = 10^(-7); i0Zn = 10^(-5); C = 7; R = 8.314; % here ... assume some gas constant T = 298....

6 days ago | 0

i want to generate a pwm of variable duty cycle

A = 1;% normalized amplitude T = 0:0.1:2000; % millisec Sx = zeros(length(T),1); i = 1; while i<=length(...

6 days ago | 0

How to get eigenvalues with varying coefficient

t = linspace(0,5,4); x1 = (1+t)/2; x2 = (t.^2)/4 ; x4 = (1+2*t)/6; A = [x1; x2; zeros(1,length(t)); x4]; B = eig(A) Divide...

13 days ago | 0

Plotting 3d ODE

t_start = 0; t_end = 5000; %set suitable time range t_duration = [t_start t_end]; %create vector for time % [w(:,1), w(:,...

14 days ago | 0

basic plotting need help

% syms wo w Q Q=20;wo=[7596.4 8394.3];w = 10; K = H(w,wo,Q) % H = @(wo,w,Q) (wo*w)/sqrt(w*w*wo.*wo + Q^2*wo.^4 + Q^2*w^4-2...

14 days ago | 0

fft is not showing correct frequency or amplitude

clear all; close all; f1=1; f2=2; f3=3; f4=4; % freq of 4 signals, Hz A1=1; A2=0; A3=0; A4=0;% Amplitudes of 4 signals f_max...

15 days ago | 0

| accepted

Selecting categorical variable range to plot on bar graph

C = categorical({'A'; 'B'; 'C'; 'D'; 'E'; 'F'}); N = [5 4 2 3 4 8]; bar(C(3:end), N(3:end)) xticks(C(3:end)) xticklabels(C(3...

17 days ago | 0

| accepted

Vary the duty of PWM signal using pause

t_info(u); function t_info(u) Pass the input variable to the function call t_info

18 days ago | 0

plot radiation intensity of an antenna

eta=377; lamda=1; k=2*pi*lamda; I=2; L=1; r=1; theta = linspace(-180,180,50); phi = linspace(0,180,50); [Theta Phi] =...

18 days ago | 0

convert complex number to Integers

Try with cordicsincos function to get more closely matching outputs theta = [-pi:pi/4:pi]; y = cos(theta)+i*sin(theta); y1 = ...

19 days ago | 0

How can the individual samples be visable in the plot

S = linspace(0,0.5,25)

20 days ago | 0

Filter a table by 2 columns

load patients T = table(LastName,Age,Smoker,Gender) Tsmokermale=(T.Smoker==1 & T.Gender=="Male") T(Tsmokermale,:) Try s...

21 days ago | 0

Vector error when using plot function

nmax = 3.8; nmin = 1.5; W = 150; C_Lmax = 1.6; rho1 = 1.225; S = 2; V1=((nmax*2*W)/(C_Lmax*rho1*S))^(1/2); V2=-round(((n...

21 days ago | 0

Unable to perform assignment because the left and right sides have a different number of elements.

clearvars % ini_dis= input('Enter the value of initial displacement : '); % ini_vel= input('Enter the value of initial velocit...

21 days ago | 0

| accepted

Incorrect dimensions for raising a matrix to a power

y=1./(sqrt((1-x.^2).^2+(4*0.01^2*x.^2))) As mentioned in the error comment use the element wise power

22 days ago | 0

How do I plot a function with multiple steps

syms y z a b c x=10 viscosity=(1.8*10^-5) Pi=3.1415926 Densityair=1.25 Densitypart=1000 y=(.01*10^-9):(0.01*10^-9+10^-6)...

23 days ago | 0

| accepted

Use of a loop to read and concat multiple cell table

%if true results{i} = readmatrix('files(i).name'); Use _readmatrix_ instead or try %if true results{i} = xlsrea...

24 days ago | 0

Error witth Matrix calculus

syms C1 L C R s; C = [[(R + s*L),-s*L];[-s*L, (R + s*L + 1/(s*C1))]]; V = [[R + s*L,1];[-s*L,0]]; i2 = det(V)/det(...

24 days ago | 0

No line on my graph

w=0.001:1000; modz=sqrt((w.^0.5 + 20*cos(pi/8)*w.^0.25 + 100)./(1+ 2*cos(pi/8)*w.^0.25 +w.^0.5)); W=log10(w); figure(3) ;...

24 days ago | 0

i have an error using plot function with syms engine

clc close all clear a=0.001:0.0002:0.0018; syms x a w %x=1.0:0.1:1.98; Ef=427000*10^6; % in Pa Em=89000*10^6; Ec=184000*...

24 days ago | 0

How do I list only i values of a cross product in a plot.

%if true x=-15:15; for i= 1:length(x) C=[0,0,30]; B=[x(i),0,30]; A=[0,40,30]; O=[0,0,0]; rOA=A-0; rAB=B-A; MagTAB=875...

27 days ago | 0

| accepted

I am unable to display my answers on command window

%if true disp('a =');disp(a) Try like this

27 days ago | 0

Why to I get "Unrecognized function or variable '1' ?

Could you check if it's _1_ or lower case alphabet _l_ used as variable in your script. Both appear same in Matlab scripts and h...

29 days ago | 1

Adding border to table

Check this https://in.mathworks.com/help/rptgen/ug/mlreportgen.dom.rowsep-class.html

1 month ago | 0

It does not stop!

%if true while abs(K-1)<(10^-5) This is check of tolerance using while condition according to your problem

1 month ago | 0

How do you substitute x(1),x(2),x(3) in place of kp,ki and l respectively?

syms kp ki l y= ((1/10^(l + 1)*ki*kp*l*sin((pi*l)/2))/(kp + (ki*kp*cos((pi*l)/2))/10^l) - (1/10^(l + 1)*ki^2*kp^2*l*cos((pi*l)/...

1 month ago | 0