Community Profile

photo

VBBV


PEC

Last seen: Today Active since 2017

Programming in MATLAB applied to interdisciplinary engineering fields

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • 12 Month Streak
  • Thankful Level 3
  • Promoter
  • Solver
  • Personal Best Downloads Level 2
  • First Review
  • Knowledgeable Level 4
  • Pro
  • Revival Level 3
  • First Answer
  • 5-Star Galaxy Level 1

View badges

Content Feed

Answered
I need to plot the following script. But it gives an error.
close all clear all %properties of rocks Vs_soil=170; Psoil=1.5; Hs=70; Vs_rock=1000; Prock=2.4; damp=0; %impedan...

4 hours ago | 2

| accepted

Answered
When I run this breast cancer detection code I get "Size inputs must be scalar. " error. How can I solve it ?
hist_data = zeros(size(round(hist_count))); When you use hist_count as dimension for hist_data it takes size values from h...

8 hours ago | 0

Answered
If part of While loop not executing any functions
while PF == isempty(PF) if all(Pact == isempty(Pact)) && and(Pre == isempty(Pre)) break else Papp = s...

10 hours ago | 0

Answered
how to plot a continuous graph in a loop
for k=1:10; x=5; y(k)=2*x-5*k*k*k; plot(1:k,y(1:k),'*'); % use the loop indices to plot in a loop ...

14 hours ago | 0

Answered
when i am plotting this conditional for loop program no plot is showing only one dot is showing. Can anyone help me about how to display plot? i am using Matlab 2013..
% conditional x= -5:0.005:15; for k=1:length(x) if x(k)<0 y(k)=sqrt(x(k)^2+1); elseif x(k)<=10 y(k...

14 hours ago | 0

Answered
loop function help please
x=-10:1:10; for i=1:length(x) if x(i)<0 F(i)=3*x(i)^2+5*x(i)-7; else F(i)=3*x(i)+4; end end ...

15 hours ago | 0

Answered
Question in continuous time signals
%% DT = 0.01; t = [-2:DT:12]; %% Question 2.1 %Parts of Signal t1 = -2:DT:7; y1_1 = (exp(abs(-0.5*t1))).*(2*sin(10*p...

3 days ago | 0

Answered
How do plot rows of your matrix into a histogram?
A= [0 0.0032 0.0032 0.0032 1.0000 0.0010 0.0028 0.0016 2.0000 0.0012 0.0001 0.0013 3...

3 days ago | 0

Answered
Plotting an equation with summation and roots of bessel function
Please check constants in equations for which you want to find besselj roots and plot them t = 0:1:100; J0 = besselj(0,t); a...

3 days ago | 0

Answered
Make an double integral function
u_j = 10.4;% select a value u_m = 2.6; % give a value sigma_sq = 1.1;% assume a value syms x y y = 0:0.1:10; % gvien rang...

3 days ago | 0

Answered
solving an equation and adding results to a matrix
syms m; syms n; k=linspace(-3.5,+0.5); z=zeros(1,100); c=length(k); for s=1:1:100 z =solve((k(s)+1.5).^2+(m-0.75).^2==...

4 days ago | 0

| accepted

Answered
how to write delta function like this?
syms n h = @(n) dirac(n-3)-2*dirac(n-4); h = h(0:0.1:10); h(h==0) = 1; plot(h,'.','MarkerSize',4,'linewidth',2)

4 days ago | 0

Question


How to access *.mat files using Matlab drive and load them ?
D = fullfile(matlabdrive,'data.mat') K = load(D)

5 days ago | 1 answer | 0

1

answer

Answered
Numeric integration with two variable
Vb=0.228; dz = 2e-11; Ltot = 20e-9; z=-Ltot/2:dz:Ltot/2; size(z) L = 10e-9; a=2e-9; alfa = 10e-9; omega...

5 days ago | 0

Answered
discrete-time real exponential signal
clc; clear; close all alpha = -.9; t = -10 : 0.10000 : 10; y = exp(alpha.^t); % exponent of alpha is vector t stem(t,real...

5 days ago | 0

Answered
if statement for piecewise function
syms t beta = 10; p = piecewise(0<t<10,0.3*beta,10<t<20,-0.3*beta,0) fplot(p,[0 20],'linewidth',2) axis([0 20 -5 5])

5 days ago | 0

Answered
Problem for doing Monte Carlo Integration
clc clear close all %% Initialize Input tic % Time Execution Start syms x a = 0; % Lower Limit b = pi; % Upper Limit c...

5 days ago | 0

Answered
How do I properly implement Neumann boundary condition for this problem?
for j=1:Ny-1 PSI(j,Nx) = (PSI(j+1,Nx-1)- PSI(j,Nx-1))/(x(Nx)-x(Nx-1)); % PSI(y,6) Right end of channel **NEUMANN...

5 days ago | 1

Answered
Symbolic matrix with sine and cosine to numerical values.
syms q1 q2 q3 q4 q5 q6 L1 L2 L3 L4 L5 L6 % sin(q1) sin(q2) sin(q4) sin(q3) sin(q5) cos(q1) cos(q2) cos(q3) cos(q4) cos(q5) T01...

6 days ago | 0

Answered
My plot is not showing a line?
%constants d1 = 28; d2 = d1; m = 2; F = 10; Vmax = 3; nVmax = -3; %acceleration a=F/m; %Time t=d1/Vmax; %speed...

6 days ago | 0

Answered
Attempt to have a 3D mesh plot of max value of real part of eigenvalues of a matrix. Shows error saying that 'Error showing Horzcat. CAT arguments dimensions are not consistent' even though my matrix is square.
[B,k]=meshgrid(linspace(0,10,1)) BKm= [0, 1, 0, 0, 0, 0; (-0.0517428 *k-0.444277), (-0.260491), (0.112669 *k+0.1359...

6 days ago | 0

Answered
y-axis are still inverted despite using fftshift
M = 3001;sz = 4;cx = 6; d = (M-1)/2; fx = (-d:d); kx = (ones(2*sz+1,1)*cx).^2; K = sqrt(kx+transpose(kx));a = 2; D = K.^(-a...

8 days ago | 0

Answered
Laplace Transform of unit step
syms t iwant = piecewise(0<t<2*pi,sin(t),0); L = laplace(heaviside(iwant)); fplot(L,[-2*pi 2*pi]) Try like this , and also ...

8 days ago | 0

Answered
Convert higher order to first order system
clear y = @(t) sin(t) y(2) % y^(4) = 2*y'-y"+2*y^(3) t0 = 0.1; n = 100; h = 1e-2; a = [sin(t0) cos(t0) -sin(t0) -cos(t0)]';...

9 days ago | 0

Answered
Index exceeds number of array elements (1) Heuns method
% step size % h = 0.1; % number of steps % N = 10; x = zeros(1,N); y = zeros(1,N); yt = zeros(1,N); x(1) = 0.1; y(1) =...

9 days ago | 0

Answered
column-wise input for string and double data using fprintf
fprintf('%s\n %.3f\n %.3f\n %.3f\n %.3f\n %.3f\n %.3f\n', data_string.', data_numeric.') Add a newline after each format specif...

9 days ago | 1

| accepted

Answered
Colors not showing in legend
legend('Zone1','Zone2','Zone3','Zone4','Zone5','Zone6'); Use a different variable name for legends. It seems you also use i...

9 days ago | 0

| accepted

Answered
How can I get a figure from an equation ?
N = 0:10:400; M = 350*(1-(N/4010).^2) plot(N,M) Try regular plot function and check

10 days ago | 0

| accepted

Answered
arrays have incompatible sizes for this operation help me PLZ
clear;close all;clc counter=1; min_nl=-10; step_nl=1; max_nl=0; noise_levelsdB=min_nl:step_nl:max_nl; for k=min_nl:step_...

11 days ago | 0

Answered
Hello, I'm trying to plot the I-V curve for a MOSFET, but I get a "Vectors must be the same length" error message. I don't understand why this is the case.
clear all; close all; clc; x1 = 0:0.01:6; y1 = (0).*x1-(1/2).*x1.^2; x2 = 0:0.01:6; y2 = (1/2)*x2.^2; x3 = 0:0.01:6; y3 = ...

12 days ago | 0

Load more