Answered
solve a complex second order differential equation
You cannot use any numeric solver for that. You have initial conditions at η = 0, but at 0 you have a division by 0 which gets y...

8 days ago | 0

Answered
Is it possible if we convert the audio that has 1 channel (mono) to 2 channel (stereo) in Matlab?
Stereo = repmat(Mono(:), 1, 2); In the case where Mono is already known to be a column vector then this can be simplified to S...

8 days ago | 0

| accepted

Answered
break function into individual variable
syms C1 C2 x y = C1*cos(2*x) - C2*sin(2*x) Y1 = children(y, 1) Y2 = children(y, 2)

8 days ago | 0

Answered
How to display the time by a method other than the digital timer method from "duration" or "datetime"
hms() can be called passing in a duration object or a datetime object. S = seconds(finTime) ; [h, m, s] = hms(S) ;

8 days ago | 1

| accepted

Answered
draw a 3d graph with mat function
You were not sampling finely enough, and you were also plotting outside the desired range. [X, Y] = meshgrid(linspace(0,2*pi));...

8 days ago | 0

Answered
Saving workspace via command
save('NameOfFileToSaveTo.mat')

8 days ago | 0

Answered
Empty sym: 0-by-1
Q = @(v) sym(v); Tc = Q(400); Pc = Q(35); R = Q(0.0821); Z = Q(0.34); syms Vc a b c; %assume([b, c], 'real') assumeAlso...

8 days ago | 1

| accepted

Answered
How to plot an Integral
Q = @(x) sym(x); m = Q(0.023); g = Q(9.81); rho = Q(1.2); s = Q(0.00011); Cd = Q(0.9); syms v V real f =(2 .* m .* g)...

9 days ago | 0

| accepted

Answered
how is it possible to introduce the lead value of the inputs of GA in matlab
I want to solve a multi objective problem with Genetic algorithm tool box in matleb. Note that ga() can only be used for single...

9 days ago | 0

| accepted

Answered
How can I run the calculation of one equation through a range of variables in one loop
S_T = 0:3:60; %row vector TGDs = sind(TS_T); %Sine of incline TGDc = cosd(TC_T); %Cosine of incline Ax = (0:0.25:5).'; %c...

9 days ago | 0

Answered
Alternative way of defining a variable
https://www.mathworks.com/help/optim/ug/problem-based-workflow.html Problem based optimization permits you to use optimvar() to...

9 days ago | 0

Answered
Please help me to look at the code. Thx
inf(3) [-1./inf (3)] If inf(3) returns a 3 x 3 array of inf, then why doesn't [-1./inf (3)] take -1 divided by a 3 x 3 array o...

9 days ago | 0

Answered
What should go in a next-generation MATLAB X?
As part of a discussion https://www.mathworks.com/matlabcentral/answers/1450984-what-should-go-in-a-next-generation-matlab-x#com...

10 days ago | 1

Answered
I am trying to calculate and plot subsonic coefficients of pressure symbolically, but it is returning a piecewise function that I can't easily plot, what am I doing wrong?
syms x ksi %N = 20; gamma = 1.4; limits = [0 1]; M = 1.2; %alpha = deg2rad([-5:1:20]); %X = linspace(0,1,N); %Geometr...

10 days ago | 0

Answered
error on start up
Quit MATLAB. Then rename C:\Users\Erasmus\Documents\MATLAB to C:\Users\Erasmus\Documents\old-MATLAB Now start MATLAB again; i...

10 days ago | 0

| accepted

Answered
problem with creat function
Your blockDecodeSyndromeMethod is trying to call DecodeSyndromeMethod with more inputs than DecodeSyndromeMethod wants. Howeve...

10 days ago | 0

Answered
plotting a 2-colum 2d array
That syntax of using . and then a number inside (), only works for table() objects. UIAxes = gca; A = [1, 2; 5, 6; 10, 11; 1...

10 days ago | 1

| accepted

Answered
Taylor series using For loop to approximate Sin(x).
SIN(-3) function y = SIN(x) %UNTITLED Summary of this function goes here % Detailed explanation goes here n ...

10 days ago | 0

| accepted

Answered
Check for equality in the contents of two arrays ignoring order
%sets case A = [1 3]; B = [3 1]; isequal(unique(A), unique(B)) For the sets case, a different approach just might be faster...

10 days ago | 0

| accepted

Answered
How to call the function based on the simulink model?
What should I modify? You should get rid of the "clear all": it is erasing variables in the base or function workspace that you...

10 days ago | 0

Answered
what changes are needed
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/769961/G2_A.txt'; C = readmatrix(filename); forceG2...

10 days ago | 0

Answered
Convert cell array to excel - problem with nested cells
You have several options: write each cell entry as text, perhaps using M2s = cellfun(@mat2str, M2, 'uniform', 0) . If you do th...

10 days ago | 0

Answered
location information of my laptop
Not directly. However if you are using Windows then you might be able to use a .NET method such as https://docs.microsoft.com/e...

11 days ago | 0

Answered
How do I test a variable to see if it is empty?
Use detectImportOptions() on the file, and use setvartype() to force the columns to be double, and then readtable. When you do ...

11 days ago | 0

Answered
Problem running my first program
fsolve(@NL_Syst_HW4, [0,0,0]) Remember that matlab processes arguments before making the calls. The argument NL_Syst_HW4 ha...

11 days ago | 0

| accepted

Answered
How do I fix my variance? Can't figure out what wrong with my code because I keep getting NaN for my variance and y. If there anyway I could fix my variance or an easier way.
You had a persistent problem where you were assuming that var() of a vector would give you a result the same size as the vector....

11 days ago | 0

Answered
A faster findsignal method
Maybe. It would not astonish me if parts if it could be rewritten to use an available GPU. However... the algorithm already inv...

11 days ago | 0

Answered
How do I save the output array (y2) for each loop?
Under what circumstance could c be <= 0 such that the if would fail ? amultiple = input(sprintf('Enter multiple locations (0 - ...

11 days ago | 0

Answered
how can I plot 3d in matlab
It would probably be easiest to just draw 3D lines using plot3() . And use grid on

12 days ago | 0

Answered
How to loop equations and expressions used by Dynare in matlab context?
%%%%%%%%%%%%%%%%%%%%%%%%%%%% rule ={ 'a=x;' 'b=y;' "c=rho+(" + newline + ... "@ # for i in number" + n...

12 days ago | 1

| accepted

Load more