Answered
How simplify numeric symbolic fraction coefficients
This almost gets there, however vpa apparently does not work on anyting except integers, so not on decimal fractions. syms ...

5 years ago | 1

| accepted

Answered
How can I calculate the angles between a polygons vertices?
Try this — X_Y_Val = [0.29218, 0.17609 0.56518, 0.27635 0.69555, 0.16324 0.83819, 0.4948...

5 years ago | 1

| accepted

Answered
Start Geoscience with MATLAB
Given your background, visit the Geophysics faculty in the Geosciences school in your university. They should be ablle to guide...

5 years ago | 0

Answered
How to find all the intersections where multiple lines cutting a curve?
It would help to have the curve coordinates. Try this — t = linspace(0, 2*pi, 150); ...

5 years ago | 0

Answered
Minor x-ticks not appearing.
It’s plotting a duration array, so there actually are no minor ticks. Likely the only way to deal with that is to change the 'X...

5 years ago | 1

| accepted

Answered
Some data not showing up
All the data are there, and are visible with sufficient scrolling. For example — Data = randi(9, 7, 3, 4) Scroll down t...

5 years ago | 1

| accepted

Answered
Need help setting up the piece-wise functions for Fourier transfer in MATLAB
Since the homework problem specifies symbolic calculations, the piecewise funciton could be appropriate here. .

5 years ago | 0

Answered
Calculate R^2 of two graphs
One approach — x = linspace(0.1, 85, 50); % Create Data y = atanh((x-mean(x))/ma...

5 years ago | 0

| accepted

Answered
Outer edges on a patch surface
One option could be contour3. .

5 years ago | 0

Answered
Pulling a column from a matrix to a vector
Try this — M = [1 0.318524 5 2 0.534064 4 3 0.0899507 3 4 0.111706 2 5 0.136293 1]; vector1 = M(:,1) And so for the ...

5 years ago | 1

| accepted

Answered
how to extract the data for specific interval?
I am not exactly certain what the desired result is, however the retime funciton will likely produce it, regardless. Assuming...

5 years ago | 0

| accepted

Answered
preparing symbolic ODE for ode45
Try something like this — syms gamma(t) T Y C1 = 2.4 C2 = 3.1 ode = diff(gamma, t, 2) == C1 * sin(gamma) + C2 * cos(diff...

5 years ago | 0

| accepted

Answered
find local minima within a time window of interest
To find the minimum using findpeaks, multiply the first argument (‘y’) by -1 so the minimum becomes a maximum. Do not use the s...

5 years ago | 0

| accepted

Answered
I want to find the position of cells with a specific content, but the empty cells are not counted, so I take a wrong result of position
The ‘b’ variable will contain the numeric indices from the logical vector that ismember returns, so ‘a{b,1}’ should return the d...

5 years ago | 0

Answered
Finding a change in a variable due to a change in another variable
See if the griddedInterpolant function will produce the desired result p=200:1000; t=210:305; [P,T] = ndgrid(p,t); Z = T.*...

5 years ago | 0

| accepted

Answered
matrix, value, comparing
One option is pdist2 — MA = [0 4.4710 8.8828 13.6977 17.7027 21.7184]; TA = [0 5.0490 9.3733 ...

5 years ago | 0

| accepted

Answered
SYMBOLIC integration often gives complex integrands
I have absolutely no idea what the actual question is, however a possible solution would be the assume function. Experiment! ...

5 years ago | 0

Answered
Subs with 2 numbers returns a number
It is doing the substitution and the calculation at the same time, and providing the answer. Using symbolic arguments instead...

5 years ago | 0

Answered
plotting values that comes from a if else loop
I am not certain what you are doing, so I cannot suggest specific changes. The ‘Prf’ value plots, however it is a scalar so t...

5 years ago | 0

Answered
Legend with 15 colors
Try this — x = linspace(0, sqrt(300), 15); y = x; z = x(:)*y; figure surf(1:15, 1:15, z) grid on colormap(turbo(15))...

5 years ago | 1

| accepted

Answered
I need a picture of a graph similar to the one I posted
Add these calls after the surf call — colormap(turbo) shading('interp') The surf plot should then be close to what appears t...

5 years ago | 0

Answered
How to create a colored, with three equally spaced rows of colors horizontally with a dimension of 6x5x3
Try this — yellow = [1,1,0]; orange = [0.8500,0.3250,0.0980]; pink = [1, 0.5, 0.8]; tci = cat (3,yellow,orange,pink); x ...

5 years ago | 2

| accepted

Answered
Log normal Distribution Equation
Since the objective is to use MATLAB for this eventually, see the documentation section on the Lognormal Distribution. .

5 years ago | 1

Answered
Datetimes don't seem to be recognised
I’m not certain what you’re doing and I can’t run the posted code. I’m also not certain what the actual problem is. See if t...

5 years ago | 0

| accepted

Answered
how do you make a scatter plot with categorical data with connecting lines?
The data being used would help produce an appropriate response. The ‘connecting lines’ request eliminates scatter as an opt...

5 years ago | 0

| accepted

Answered
How to convolve signal and transfer function
Try this — t = linspace(0, 10) u = @(t) heaviside(t); Vin = @(t) u(t)-u(t-3); h = @(t) ( exp(-2*t)/6 ) + ( 3/16*exp(-t) )...

5 years ago | 1

| accepted

Answered
I want to read a text file that contains both text and numbers. How can I extract just certain values from it?
Try this — WingTable = readtable('FileName.txt', 'NumHeaderLines',4, 'VariableNamingRule','preserve') See the documentation f...

5 years ago | 1

| accepted

Answered
Poly with negative coefficients reverses the order
Use flip on the symbolic result instead — P=[1 -16]; %P = fliplr(P); %with or without it makes no difference syms x f =...

5 years ago | 1

Answered
fsolve yields wrong answer
Give fsolve a complex initial estimate to get a complex root — F = @(x)((x-20.6667).^2+57.89); opts = optimoptions('fsolve'...

5 years ago | 0

| accepted

Answered
Plotting the parametric curve and its second derivative
Is that is necessary to subscript ‘k’ so that it is the same size as the other elements in the calculation — t = linspace(0...

5 years ago | 1

| accepted

Load more