Answered
How to add number from equation to array and display it on chart
clear all; close all; clc; Time(1) = [0]; Quantity(1) = [0]; N0 = 100 ; tD = 5; t = 10; r=log(2)/tD for i=1:length(...

3 years ago | 0

| accepted

Answered
How to change the position of power of colorbar ?
[X,Y] = meshgrid(-1000:10:1000); Z = exp(-(X.^2+Y.^2)/1E5)*1E6; figure surf(X,Y,Z, 'EdgeColor','none') grid on colormap(h...

3 years ago | 1

Answered
Reference to non-existent field 'data'.
Use small k, in place of K , Matlab is case sensitive P='C:\Users\Lenovo\OneDrive\Desktop\NB_veh_files'; ...

3 years ago | 0

Answered
Function might not be used error
amount=bill-tip;% typo with operator There is a typo for the operator in the above line which presumably makes Matlab think...

3 years ago | 1

Answered
why this loop is not working? Actually p_j value is not changing why?
n = 10;% e.g. input number epsilon_ci = 0.001; epsilon_max = 0.01; xu = 2; fc = 100; D = 1.1; p_i = 0; %outside for loo...

3 years ago | 0

Answered
use green therom to find counter clockwise circulation and outward flux
% Define the vector field F syms x y F = [7*x-3*y, 7*y-3*x]; % Define the integrand as a symbolic expression for Circulatio...

3 years ago | 1

Answered
can you help me to solve this equation?
syms x real P = sqrt(27.8*exp(5*x)-1) == acos((120*x^2+sqrt(2*x))/(17*x-65)); % better to use acos function s = double(vpasol...

3 years ago | 0

Answered
Finding the roots across a range of values
H = 0.1; I = 200; Y = 0; b = transpose(1:I); for i = 1:I b(i) = fzero(@(b)(b*tan(b)-H),b(i)); BI(i) = b(i) ; end

3 years ago | 0

Answered
Two Quadratics are equal find K1 and K2 cancel out X
A =[1 -1; 0 0]; B = [0; 1]; MC = ctrb(A,B); %Gives controllability matrix det (MC) %Not zero so is controllable syms K1 K2 ...

3 years ago | 1

| accepted

Answered
How to on/off a variable after 3 seconds interval
led1=0;  aa=3; tic T = toc while T<=90     pause(3);     led1=1;      pause(3);     led1=0;  toc; T = to...

3 years ago | 1

Answered
How to extract the correct data with regexp?
Use match option in place of 'tokens' in the line tokens = regexp(DATALow, '\<(R\d{2}[A-Z]?)/.*?(\d{4})[A-Z]*(?:(?:\d{4})[A-Z])...

3 years ago | 0

Answered
How can I construct a triangle function, when I tested one using 'integral(fun.-pi,pi)', error occurred.
integral(@triangle,-pi,pi,'ArrayValued',1) % call function using function handle function [a] = triangle(n) a=zeros(size(n)...

3 years ago | 0

| accepted

Answered
How to pass the signal x(t) in IIR band stop filter? Kindly develop the program for the following...... please.....
fs=5200; t=0:(1/fs):1; x=2*sin(400*pi*t)+3*cos(900*pi*t)-0.5*sin(1400*pi*t)+sin(2400*pi*t); figure % original signal plot(t...

3 years ago | 0

Answered
Why doesn't it work ?
s = 1.25; t1 = 0:0.01:pi/2; t2 = pi/2:0.01:pi; t = [t1 t2]; p=[4*sin(2*t1).^2.*exp(-(t1/s).^2)+2 4*sin(2*t2).^2.*exp(-(t2/s...

3 years ago | 0

Answered
fluctuations with specified mean velocity and amplitude
plot(t,v+V,'-*') hold on plot(t,V) Do you mean the above ?

3 years ago | 0

Answered
Why Can't int Find a Simple Integral?
Tips In contrast to differentiation, symbolic integration is a more complicated task. If int cannot compute an integral of an ...

3 years ago | 0

Answered
how to iterate cell array?
for i = 1:51 for itr = 1:100 %number of iteration is the size of my cell array N = all_N1{itr,i}; % switch position of...

3 years ago | 0

Answered
What is the answer of [(4 -2 ) /2 , 5 +6 , 7 , 8 ] ? Why does MATLAB output [1 5 6 7 8]?
[5 +6] Is not equivalent to 5+6 When you use concatenate operator [ ]

3 years ago | 0

| accepted

Answered
How to make piece-wise function accept single variables and vectors
x = 2:1000; y = piecewise(x) function y = piecewise(x) for k = 1:length(x) if (x(k)>0) & (x(k)<=120) % for 0 <...

3 years ago | 0

| accepted

Answered
Plotting in App designer
You need to add a callback function first to each of the components for graphs in which you want to plot. E.g. %Callback to...

3 years ago | 0

Answered
How to plot histogram using given data ?
Check the answer from the below link https://in.mathworks.com/matlabcentral/answers/1670649-bar-plot-with-a-hatched-fill-patter...

3 years ago | 0

Answered
How use imread in a loop
image_test{t}=imread([path,'nan_rows' num2str(t)])

3 years ago | 0

| accepted

Answered
multiplying row vector by a scalar
A = data(3, :).*B

3 years ago | 0

Answered
how do I solve symbolic eigenvalue?
I presume you need to compute the inverse of mass matrix , m, for a 4 x 4 stiffness matrix , before finding the Eigen solution....

3 years ago | 0

Answered
Adding and Deleting Columns in UITable App Designer
You can modify the function for columnCheckBox Value Changed as below, by using addvars function function Column4CheckBoxVa...

3 years ago | 0

| accepted

Answered
I have issues calculating the pitching moment (delta_e) and a specific formula
clc; clear; close all; % Defining variables V = 202; % Velocity (m/s) R = 1000; % Radius of curvature (m) g = 9.8; % Gra...

3 years ago | 0

Answered
How to remove extra labels from polarplot?
ax = gca ax.RTick = [] ax.RTickLabelRotation = 90; After plotting call the axes and set the RTick property to [] and RTi...

3 years ago | 0

Answered
Figure legend mismatch when using gobjects
Check the answer given by @Steven Lord in the below link https://in.mathworks.com/matlabcentral/answers/244707-how-to-change-o...

3 years ago | 1

| accepted

Answered
Need help with this code. Not sure what I am doing wrong.
fprintf('hoop stress for inner radius cylinder, r = b: %0.2f\n', sigma_theta_theta1)

3 years ago | 0

Answered
how do I write 2^-x in MatLab?
x=1:10; % if you have x as vector of values 2.^(-x) % then use .^ element wise power % 2nd option is straightforward x = 2...

3 years ago | 1

Load more