Answered
How do I change this system with function handles to linear equations to plot discretely?
u = @(n) double(n>=0); %converts symbolic u to array of n uu = @(n) 1*(n>=0); %unit step function x = @(n) u(n-2)-u(n-4); n=[...

2 years ago | 0

| accepted

Answered
Solving non linear equations
syms J1 J2 J3 T1 T2 T3 T4 Jm = 5077.12; Js = 301.32; Je = 330.136; A2 = 449200; A4 = 519000; Fms = 0.305; ...

2 years ago | 0

Answered
Interpolating by latitude and depth
interp2() expects the first two inputs to be either vectors or 2d arrays. If they are vectors then interp2() automatically expan...

2 years ago | 0

Answered
Subtraction Should Show Zero But Shows Small Error
What is going on here is that MATLAB represents double precision numbers in IEEE 754 Double Precision format. That format involv...

2 years ago | 1

Answered
how to calculate product of two 3D matrices (both 101 by 101 by 101 ) in matlab ?
u^2 is not defined for 3D matrices.

2 years ago | 0

Answered
Third-order polynomial equation which complex roots
syms c k L eqn = c^3 ... - c^2*(2*k*exp(4*k*L) + 2*k*exp(2*k*L) + exp(4*k*L) - 6*k^2*exp(2*k*L) + 1) / (2*exp(2*k*L) * k *...

2 years ago | 0

Answered
I am getting the error The file may be corrupt while trying to save a fig (7.5E7 data samples for 8 channels) using Matlab ver17b: The file may be corrupt
Possibly the generated fig file would be more than 2 gigabytes. If you were trying to savefig it... you might need to save() th...

2 years ago | 0

Answered
How do I use fprintf to print to a text file?
filename = "AppropriateName.txt"; [fid, msg] = fopen(filename, "wt"); if fid < 0 error('failed to open file "%s" because ...

2 years ago | 0

Answered
Variable precision point for fprintf command set by user input
fprintf( fprintf(' %%10.%df'), precision), Ab(i,:))

2 years ago | 1

Answered
Trying to set up a matrix, getting error message
You have accidentally created a variable named fscanf

2 years ago | 0

Answered
The fastest method to perform sum of function
The fastest way of adding the values depends upon the fine details of your hardware, and on the details of how the data is laid ...

2 years ago | 1

Answered
How do I make greek letters appear as symbols and use them as variables?
You cannot do that. If you use the Symbolic Toolbox, and you are using LiveScript (or MATLAB Online, or MATLAB Answers), and yo...

2 years ago | 1

| accepted

Answered
error: Array indices must be positive integers or logic
Due to floating point round-off, the result A+(B*x(i)) might not be exactly an integer. You should round() it.

2 years ago | 0

Answered
How to fix the error in integration?
xmin = 0; xmax = 1; jb=zeros(tstep,xstep); X = linspace(xmin,xmax,xstep-1); The X values are going to be between 0 and 1...

2 years ago | 0

| accepted

Answered
Question about outputting a matrix to a pgm file
Yes, the PGM file format is relatively simple. You can fopen(), fprintf() several times, and fclose() https://netpbm.sourceforg...

2 years ago | 0

Answered
Error "It must be of type 'Type::MATLABOutput"
f_35dB = solve(ESD == max(ESD)/3162, f); max(ESD) returns a max() expression that is incompatible with the result of the calcul...

2 years ago | 0

| accepted

Answered
How can I export transfer functions or data from System Identification app to MATLAB workspace using a script?
Suppose you have a SID file named "testit.sid", use the following command to generate a struct named "S". S = load('testit.sid'...

2 years ago | 0

| accepted

Answered
Error "It must be of type 'Type::MATLABOutput"
syms t w; x_t = exp(-100*t)*(heaviside(t)); X_w = fourier(x_t, w); ESD = abs(X_w)^2; % Plot ESD against linear frequency f ...

2 years ago | 0

| accepted

Answered
Open up a full size figure window on 2nd display
You should add the option 'WindowState', 'maximized' or 'WindowState', 'fullscreen'

2 years ago | 0

| accepted

Answered
Programmatically calculate indices of the outline of a circle and all points within in it
X = 0.375:-0.125:-0.375; % x coordinates Y = -0.375:-0.125:-.375; % y coordinates npoints = [99 99]; % define improved resolut...

2 years ago | 0

| accepted

Answered
A complex form containing constant, linear, quadratic, etc., forms
N = 3; syms x X1 a [N 1] real syms A X2 [N N] real syms C X3 [N N N] real syms E [N N N N] real for i=1:N % Linear interac...

2 years ago | 0

Answered
I need help plotting data from a file
The table you are reading has some number of variables that is different than 2. There are ways to specify the range that you ...

2 years ago | 0

Answered
Setting a default colororder
C = orderedcolors("gem12"); set(groot, "defaultaxescolororder", C)

2 years ago | 0

| accepted

Answered
Execution of script Faddeeva_w as a function is not supported:
You need to first execute Faddeeva_build to configure the remaining functions for use with your system.

2 years ago | 0

Answered
How to execute double for loop?
You have nested parfor loops, but each time you are overwriting the (j) entry result =log2(N) + (1/N).*( (1/(4.*pi...

2 years ago | 0

| accepted

Answered
How to calculate the value of (x) on xaxis in MATLAB ?
Q = @(v) sym(v); pt1 = Q(2) ; pt2 = Q(3.954) ; h = Q(0.4) ; % wave length dx = Q(1) ; z = Q(30) ; syms L x1 = exp( j*( ...

2 years ago | 0

Answered
How I have all three error bars in one figure
R1=10 R2=27 R3=10 Rtotalseries=R1+R2+R3 Vs=5 Itotal=Vs./Rtotalseries V1=(Vs./Rtotalseries).*R1 V2=(Vs./Rtotalseries).*R2 ...

2 years ago | 0

Answered
why validateFcns is not working in my nlmpc Code?
The problem is that when you specify a character vector for the function, then the function cannot be a local function (must hav...

2 years ago | 0

| accepted

Answered
How to Use SegFormer in Matlab
SegFormer is a Python toolbox from NVIDIA. https://docs.nvidia.com/tao/tao-toolkit/index.html You can invoke the python from i...

2 years ago | 1

| accepted

Answered
Direct Connection of IMU Sensor to MATLAB
The problem is that IMU sensors typically do not have a USB interface, and typically do not have an PCI or PCIe interface that w...

2 years ago | 1

| accepted

Load more