Community Profile

photo

VBBV


PEC

Last seen: Today Aktiv seit 2017

Programming in MATLAB applied to interdisciplinary engineering fields

Statistics

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

Abzeichen anzeigen

Content Feed

Anzeigen nach

Beantwortet
How to parameterize function.
syms x y z P = [x^2 +2*y +3*z; x*y -2*z^2] subs(P,{x,y,z},{t,t,t})

26 Minuten vor | 0

Beantwortet
"Matrix dimensions must agree" when trying to plot the sum of a sin function
s2 = sin((2*m-1)*x)./(2*m-1); Use element wise division

etwa 6 Stunden vor | 1

| akzeptiert

Beantwortet
Vectorize application of xcorr() function
t = 0:1e-3:1-1e-3; AF_hat = []; fd_ = linspace(-8,8,length(t)); s = 1; Ts = 10; AF_hat = xcorr(s,s.*exp(-1i*2*pi*fd_.*t))...

etwa 8 Stunden vor | 0

Beantwortet
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise matrix powers, use '.^'.
The element wise power for a scalar should not affect much on your calculation unless vectors are multiplied or raised to power ...

etwa 8 Stunden vor | 0

Beantwortet
Z must be a matrix, not a scalar or vector.
t=0:30 % a vector x=(1+0.25.*cosd(45.*t)).*cosd(t); y=(1+0.25.*cosd(45.*t)).*sind(t); [X,Y] = meshgrid(x,y) % X and Y matr...

etwa 14 Stunden vor | 0

Beantwortet
Could anyone tell me why I am getting an error with "else" in my code. This is my first time using this software and I am very confused.
This is standard syntax for if-else statements in matlab if condtion ... elseif condition ... else ... end

etwa 16 Stunden vor | 0

Beantwortet
error: Index in position 2 exceeds array bounds (must not exceed 31).
clear all clc %Geometry definition L=0.3; %Length of the The rectangular bar in meter W=0.4; ...

ein Tag vor | 0

Beantwortet
Is there a way of getting displayFormula to print multiplication symbols in an equation?
syms a b strEquation = "a*b"; disp(strEquation)

ein Tag vor | 0

Beantwortet
Hello all please help me to plot this function
The conditions seem wierd, considering random number series .as inputs m=4 syms i; % t = 50; for t=2:50 x(t)=randi([0...

ein Tag vor | 0

Beantwortet
My code is giving me a straight line for values of N other than 5
clear variables close all M = 250; % The length of each function t = -5:0.1:5; y = zeros(1,M); % Initiallize the sum to zero...

ein Tag vor | 0

Beantwortet
For loop not stopping
if ismember(-9999,aspect(i,1)) Check using ismember

2 Tage vor | 0

Beantwortet
Bar graphs don't group bars if there is only one group in the data
like this ? % Artificial data: Two vertical vectors of height 3 x=reshape(randperm(6),3,2) % Correct grouping into pairs s...

2 Tage vor | 1

| akzeptiert

Beantwortet
Using listdlg along with case statement
A = [15 22 25 17 7 3 2 2]; B = [17 23 27 15 5 2 1 1]; % ---^^^^^^^^ these values in B are higher compared to A length(B) le...

2 Tage vor | 0

Beantwortet
Change plot scale y axis
u21=[224 224 224 223 218 218 217]; beta1=[0 0.19 0.26 0.38 0.76 0.83 0.9]; plot(beta1,u21,'-*'); xlabel('beta') ylabel('U[V]...

2 Tage vor | 1

Beantwortet
Bar graphs don't group bars if there is only one group in the data
% Artificial data: Two vertical vectors of height 3 x=reshape(randperm(6),3,2) % Correct grouping into pairs subplot(1,2,1)...

2 Tage vor | 0

Beantwortet
Taking derivative and putting it equal to 0 to find theta.
syms x s h S = (6*s*h) - ((3*s*s*cot(x))/2) + ((3*s*s*sqrt(3)*csc(x))/2) Y = diff(S,x) == 0 % take derivative of equation w....

2 Tage vor | 0

Beantwortet
I want help solving differential equations
syms x y(x) eqn = diff(y(x),x)+sqrt((1-y^2)/(1-x^2))==0 cond = [y(0) == 1;y(1) == 0] % check with some other initial conditio...

2 Tage vor | 0

| akzeptiert

Beantwortet
how to replace/import .mat file with parameter values?
A = load(websave('X','https://in.mathworks.com/matlabcentral/answers/uploaded_files/1213353/torque_for_Sid.mat')) speed = 1000/...

3 Tage vor | 0

Beantwortet
fprintf results into 2 columns
clc; clear; close all; principal = 1000;%input('Enter Principal in Dollars: '); years = 5;%input('Enter Number of years: '); ...

3 Tage vor | 2

| akzeptiert

Beantwortet
copy corresponding values of 2nd metrics depend on 1st metrics values
Z=[]; ii=0 Z2=[]; iii=0; Z3=[]; iiii=0; X = rand(10) Y = rand(10) [RawX, ColX]= size(X) for j=1:RawX; for n=1:ColX...

4 Tage vor | 0

Beantwortet
Create an alternating matrix
maxV = 20; stepS = 5; I = zeros(1,2*(maxV/stepS)+1); I1 = 0:stepS:maxV; I2 = -I1(2:end); I(1:2:end) = I1; I(2:2:end) = I2;...

4 Tage vor | 0

Beantwortet
I am getting error while trying to generate data for qtot_eV through variation of "d".
As the error states, you need to provide scalar values for integral limits betaevanmax=10./max(d); % use a scalar value for up...

4 Tage vor | 0

| akzeptiert

Beantwortet
my code output is right but my graph gives me nothing it's blank and I don't know why it wont work there are no error just gives a graph with nothing on it
Use loop index if Price(i) < buy stock(i) = stock(i)+25; % use loop index ... elseif sell < Price(i) stock(i) = stock(i...

4 Tage vor | 1

| akzeptiert

Beantwortet
Plotting a line using one point and a slope in the loglog scale
x = (25081:1000:10000000); m = -3.62; x1 = 25081; % use coordninate y1 = 3.046e-16; y = m*(x-x1)+ y1 loglog(x, abs(y)) % ...

5 Tage vor | 0

Beantwortet
Run a function inside a for loop 10,000 times and record the 3 separate outputs for each trial
Sl(trials) = S; Ml(trials) = M; Ll(trials) = L;

5 Tage vor | 0

Beantwortet
Creating a specific time subplot
%hold on. Comment this line subplot(2,1,2) Comment the line above

5 Tage vor | 0

| akzeptiert

Beantwortet
Error in Euler's method code.
You can use the below approach for implementing your problem clc clear all close all h=0.01; N=120; % number of steps ...

5 Tage vor | 0

Beantwortet
Hold on and Hold off command keeps all plots on subsequent graphs
figure(1) fplot(eqn1,[0,4*pi]) hold on fplot(d_eqn1,[0,4*pi]) figure(2) fplot(eqn2,[-10,10]) hold on fplot(d_eqn2,[-10,...

5 Tage vor | 0

Beantwortet
Unable to perform assignment because the left and right sides have a different number of elements.
K=zeros(1,4100); L=zeros(1,4100); Check the size of vectors K and L

6 Tage vor | 0

Beantwortet
How can I change the title of a figure through each iteration of the loop?
close all; clear variables; clc; % % For Phi/Psi = +/-10 CoverageArea_mean_10 = {[84.4735,21.1779,6.4247,2.1416],[45.2112,...

6 Tage vor | 0

Mehr laden