Respondida
lenend keep only text
dummyh = line(nan, nan, 'Linestyle', 'none', 'Marker', 'none', 'Color', 'none'); dummyv = line(nan, nan, 'Linestyle', 'none', '...

más de 5 años hace | 0

| aceptada

Respondida
Error using optimoptions (line 124)
%if true % code % end opts = optimoptions(@fmincon,'Algorithm','interior-point'); Try function handle for passing s...

más de 5 años hace | 0

| aceptada

Respondida
How to write a mathematical function in MATLAB?
%if true % code % end syms t i j k vx = t^2; vy = t^3; vz = t^4; V = @(t) vx*i+vy*j+vz*k; VV = diff(V,t);% differ...

más de 5 años hace | 0

| aceptada

Respondida
To plot the sin signal continues and discrete form
fs = 100; t = 0:1/fs:1; f = 5; x = sin(2*pi*f*t); subplot(211) plot(t,x);

más de 5 años hace | 1

| aceptada

Respondida
Creating a time input dialog and plotting in the time period.
You have additional ] at the end of input box. Plus you have defined st and at as structure. Define them outside the if conditio...

más de 5 años hace | 0

| aceptada

Respondida
For Loop Variable Selection from Index
Assuming the vectors _Time, BiSGspeed, Counts_ are equal length then you can try like %if true % code % end Time =...

más de 5 años hace | 0

| aceptada

Respondida
How to plug in values to symbolic variables and update the matrix?
%if true % code % end lambda = sym('20'); mu = sym('10'); T = your matrix k = 1; P = transpose(T)*k.*T

más de 5 años hace | 0

| aceptada

Respondida
Index exceeds the number of array elements error
Use _for loop_ index to access the vector as below %if true % code % end >> r=exprnd(1/8, 1,5); >> at=cumsum(r); ...

más de 5 años hace | 0

| aceptada

Respondida
Help storing my iterations into my variables
Inside the while loop use %if true % code % end X(k) = xr; EE(k) = ea; F(k) = yrp;

más de 5 años hace | 0

| aceptada

Respondida
cell array with numeric values only
%if true % code % end C = {'long: 151.125#';'long: 151.126#'} for i=1:length(C) nn{i}=(C{i}(7:13)); end A = cell2m...

más de 5 años hace | 1

| aceptada

Respondida
How do I partial differentiation a function with 2 variables?
Try this % if true % code % end v = sym('120') r = sym('2000') p = diff(v^2/r) Since you assign for V, R as co...

más de 5 años hace | 0

| aceptada

Respondida
Complex Fourier Series in MATLAB
% if true % code %end F1=symsum(Fn*exp(1i*n*P*x/P),x,[-Inf,Inf]) Use x as the summing variable.

más de 5 años hace | 0

| aceptada

Respondida
Integration of Bessel functions
Define symbolic variables % if true % code % end syms mu r ; deltar=0.646*mu; D_az=4*mu; R_az=D_az/2; int(bessel...

más de 5 años hace | 1

Respondida
Calculate the energy of the signal, find odd and even component and then plot it.
% if true % code % end clc syms x t close all x=exp(-2*t); z=@(x) x.^2; Energy=integral(z,0,inf); %plot odd and e...

más de 5 años hace | 0

| aceptada

Respondida
How to plot step functions in Matlab
%if true % code %end x = -2*pi:0.1:3*pi; for i = 1:length(x); if x(i)<0; y(i)=0; elseif x(i)<=2*pi & x(i)>=0 ; ...

más de 5 años hace | 0

| aceptada

Respondida
creating a loop to generate a plot
%if true % code %end n = 1:100; YY = (1+1./n).^n; plot(n,YY); figure(2);semilogy(YY,n);

más de 5 años hace | 0

| aceptada

Respondida
How to use the same equation to get shapes of different sizes and locations.
Try this angles = linspace(0, 2*pi, 500); radius = [40 25 15]; CenterX = [0 0 0]; CenterY = [40 105 145]; for i = 1:lengt...

más de 5 años hace | 0

| aceptada

Respondida
The degree of function is unknown
Do you mean this expression ? syms x a Q=5*x^2 + a; polynomialDegree(Q) ans = 2

más de 5 años hace | 0

Respondida
How to turn off text interpreter when plotting timeseries objects
Use a space and backslash between ABC _ DEF when interpreting variables. Latex treats text after _ subscript ts = timeser...

más de 5 años hace | 1

Respondida
How to plot an equation that uses multiple files of data
I see the graph with log scale on x axis See the code clear all; clc; load freq1.txt; load Rzero1.txt; load Lzero1.txt;...

más de 5 años hace | 0

| aceptada

Respondida
Plot columns against each other depending on user input from imported excel file.
See the solution in the below link <https://in.mathworks.com/matlabcentral/answers/621968-need-help-plotting-things-from-a-ta...

más de 5 años hace | 0

| aceptada

Respondida
Setting up a Deflection Plot
Try this, the way to plot F vs deflection clearvars clc r = 0.005 ; % [m] radius of bar P = 0.4; % [m] load app...

más de 5 años hace | 0

| aceptada

Respondida
a circle is divided using 2 by inscribing 2 circles how can we divide three regions obtained from it into equal 15 zones
See the fig attached, is the same figure you want, if i understand it right N = 4; % divides to 4 parts N1 = 10; a = lins...

más de 5 años hace | 0

| aceptada

Respondida
a circle is divided using 2 by inscribing 2 circles how can we divide three regions obtained from it into equal 15 zones
Try this . it works , change the value of N to number of equal parts you want N = 15; % divides to 15 parts a = linspace(0...

más de 5 años hace | 0

Respondida
How to customize Legends?
Try this.. use handle structure as below figure p1 = plot(datax1,datay1 , 'ro') hold on plot(datax2,datay2, 'ro') plot(data...

más de 5 años hace | 1

| aceptada

Respondida
Plotting help. No line or points appearing on plot
You need to make time as vector. Then you can plot the trajectory, if i understand it right. See the code below, it plots xe v...

más de 5 años hace | 0

| aceptada

Respondida
how to make given plot smooth
Change the step size of vector yy yy=0:0.2:5*(length(final_integrand)-1); But ensure that final_integrand is also the same s...

más de 5 años hace | 0

| aceptada

Respondida
Need Help plotting things from a table
Try this clearvars clc data = readtable('RiskFactorAnalysis (1).csv'); userinput = input('Enter a Country: ','s'); Coun...

más de 5 años hace | 1

| aceptada

Respondida
Tryng to graph with for loop
Dont use fractional increments for loops, Try this Mean=3; Lamda=.33; for i=1:10 % integer increments only s(i)=exp(-Lamda*...

más de 5 años hace | 0

| aceptada

Respondida
Partial derivative of a time derivative
I don't get any error It shows the result as T = 1 as you mentioned. %if true % code % end syms('qxy(t)',[2,1]); ...

más de 5 años hace | 1

Cargar más