Community Profile # VBBV

### PEC

Last seen: Today Attivo dal 2017

Programming in MATLAB applied to interdisciplinary engineering fields

#### Statistiche

All
• • • • • • • • • • • • #### Content Feed

Visto da

Risposto
a little bug in function "plot/stem"
a = ones(1179080,1); stem(a(1:100000:end))

circa 6 ore fa | 0

Risposto
Why don't the markers have the correct color in the legend?
A1 = randi(10, [5 5]); B1 = randi(10, [5 5]); A2 = randi(10, [5 5]); B2 = randi(10, [5 5]); h1=scatter(A1,B1,'g'); hold on ...

circa 21 ore fa | 1

Risposto
updating tiledlayout in a loop - "Invalid or deleted object"
Delete the hold on commands that are present AFTER the scatter commands and place it BEFORE the scatter commands. Then add t...

1 giorno fa | 0

| accettato

Risposto
Symbolic equation system - Hi! Can someone please tell me why this algortim is not working? I know resultant values for XA and T are 0.2 and 657 but i want it to work.
If you use vpaintegral instead of int and it can be solved using the vpasolve function.. Also, the integral needs to done w.r....

1 giorno fa | 0

Risposto
Shifting a line on the x-axis ONLY
q = [0:0.01:2]; figure plot(20*q.^2, q.^2) hold on plot(20*q.^2-50, q.^2)

2 giorni fa | 0

| accettato

Risposto
Matrix display wrong value
L1=1000; L2=2000; b1=10; h1=10; b2=20; h2=20; A1=b1*h1; A2=b2*h2; E1=70e3; E2=205e3; c1=cos(deg2ra...

2 giorni fa | 0

| accettato

Risposto
How to I get the info from a designated cell from Excel when it is a string?
May be the error refers to the variable Depth for which there is no Value field.. Can you check whether its a simple variable...

3 giorni fa | 0

| accettato

Risposto
Silly question about 2 column matrix
From the below error, its visible that AL01 & SIGMA09 are both scalar variables and difference between them is also scalar. They...

3 giorni fa | 0

| accettato

Risposto
Why in the code given below the number of iterations of the second - for loop ('j') decreases at each iteration of first - for loop ('l')?
For each iteration of I , the j counter is reduced by N- I instead of N-1 N = 5; length = 0; for I=1:N-1 disp(['l: ...

3 giorni fa | 0

| accettato

Risposto
why is the lamp changing color?
Hi Mauzmi Ali , In the app designer code, the editField component accepts numeric inputs. By default the Matlab editField com...

4 giorni fa | 0

| accettato

Risposto
How to do a "for-loop"?
Hi Matrix, What you need in this case is not for loop but a while loop which can avoid writing a loop 600 times and hence mu...

5 giorni fa | 0

Risposto
Array indices must be positive integers or logical values.
x = 0:0.1:4; f = x; g = -2*log10(0.01+10e-4*x); plot(x,f,x,g); func = @(x) 2*log10(0.01+10e-4*x) + x; res = bisect(func, 0,...

5 giorni fa | 0

Risposto
Partitioning and putting titles in a subplot
If you want partioning using subplot titles then below is one method clc; close all; clear all; x = [0 1 2 3 6 4 5 8 5]; y ...

5 giorni fa | 0

Risposto
How to adjust plots with several subplots with different loops?
You can modify the for loop something like this as shown below x = rand(1,10); z = rand(1,10); w = rand(1,10); k = 0; fi...

6 giorni fa | 0

| accettato

Risposto
How to flip an ordered X-axis that is half half separated for data?
Use xticklabels function to modify the order of axis labels x1 = {'6','5','4','3','2','1'}; x2 ={'12','11','10','9','8','7'}...

6 giorni fa | 0

Risposto
Surface plot generation for a 3-variable function
Try to use a for loop to plot the resulting expression in 3rd dimension as shown below since surf function plots 2D matrices o...

6 giorni fa | 0

Risposto
Scalar structure required for this assignment.
Sis.On={D_(:,2)};

7 giorni fa | 0

Risposto
xlswrite different columns into excel each run
writematrix (x.','testxxx.xlsx','WriteMode','append') Use the transpose for x

7 giorni fa | 0

Risposto
How to calculate the predicted ellipse area and draw the graph?
chisquare = chi2inv(0.95,2); %inverse of the chi-square cumulative distribution function with 2 degrees of freedom at P = 0.95 ...

7 giorni fa | 2

| accettato

Risposto
Axis labels dont show after text command
Did you write custom function with name contours or you wanted to use Matlab's built-in function contour .? % custom function...

7 giorni fa | 0

Risposto
Looping Excel files in one varibale
LDT{i} = LDT{i} =

8 giorni fa | 1

Risposto
solving symbolic array to output a numerical solution
From the reference link given by @madhan ravi, you can use struct2cell function and later convert the cell to double array usi...

8 giorni fa | 0

Risposto
1×0 empty double row vector using find
clc; clear; close all x=[0 0.1 0.2 0.3 0.4 0.5]; y=[1 7 4 3 5 2]; h=0.1; n=(max(x)-min(x))/h suma=0; for i=2:n aux=h*...

8 giorni fa | 0

Risposto
Trouble with the "double" numeric data type
The below version of code runs without errors. clear; syms x t % r=24; deltamu = 0.5; sigma = 5; lambda = 1; Cstar = 7;...

9 giorni fa | 0

Risposto
Plotting multiple graphs in one plot
% PR = (Md_MSF_seclatent_steam)./(Ncqsum); % Performance Ratio PR = rand(365,1); PR_ave=sum(PR)/365; ...

9 giorni fa | 0

Risposto
Matrix double and complex double
If you do a check before the if-elseif-else-end statement, the values of m, m1 and n , n1 are same That leads to the if-elsei...

9 giorni fa | 0

| accettato

Risposto
How to solve a simple symbolic identity?
syms w0 a b t m F0 eqn = 2*b*w0*cos(w0*t) - 2*a*w0*sin(w0*t) == (F0*cos(w0*t))/m; sol = solve(eqn, [b]) b = subs(sol,t,0)

10 giorni fa | 1

Risposto
Hi everyone...I am getting transient peak in the signal from 0 to 6000 hz in the sound pressure level plot. Can anyone suggest me how to remove it?
Use smoothdata function for that frequency range, or apply A-weighting filter for the SPL data

11 giorni fa | 0

Risposto
Conditional if loop for addition of three consecutive numbers in app designer interface
if (x1+x2+x3)>75 app.EditField_5.Value=disp('OK'); elseif (x2+x3+x4)>75 You need to use parenthesis ( ) in the if-...

12 giorni fa | 0

Risposto
Why contourf and fcontour gives different images for the same matlab code?
If you change the meshgrid limits in the below line [x, y] = meshgrid(-1/10:0.005:1/10); and de-normalize the I variable in t...

12 giorni fa | 0

| accettato