Answered
How to solve this issue?
If the extra parameters (or any other values) you are passing to ‘Costatesimple’ are symbolic, (and do not contain any symbolic ...

6 years ago | 0

| accepted

Answered
How can I display a table with many rows?
Apparently, the vectors that create the table only have 41 elements. In a table, the first row (the 'VariableNames') is not con...

6 years ago | 1

| accepted

Answered
Errorbar Plot with Line of best fit
Try this: x = [1 2 3 4]; y = [2 4 6 8]; yneg =[0.5 0.5 0.5 0.5]; ypos =[0.5 0.5 0.5 0.5]; xpos = [0.1 0.1 0.1 0.1]; xneg ...

6 years ago | 0

Answered
pzplot in symbolic toolbox
‘as you can see Y_out has 1 row and 4 column.’ We cannot see any of that because they are not provided. This could work,...

6 years ago | 0

Answered
Plotting every nth point from a table for a scatter3 plot
If I understand correctly what you want to do, this should work: x = rand(1520371,1); % Create...

6 years ago | 0

| accepted

Answered
ode45 function troubles
Loop through the values of ‘z’: sdof = @(t, x, k, m, z) [x(2); x(1).*-k/m+x(2).*-2*sqrt(k*m)*z/m]; k=1000; m=5; z=[0 0.1 0....

6 years ago | 0

| accepted

Answered
help with fixing my plot please
My version of MATLAB cannot run images of code, only actual code, so I created an equivalent-size ‘A’ matrix: A = rand(5, 12);...

6 years ago | 0

| accepted

Answered
Graphing over a period
First, use syms to start the Sytmbolic Math Toolbox. Second, provide the missing multiplication operator. Third, use fplot...

6 years ago | 0

Answered
convert variables from string to integers
The assignment probably wants you to turn them into unsigned integers. I leave the rest to you.

6 years ago | 0

| accepted

Answered
How can I calculate the minimum of a function of two variables?
One approach: syms x y f(x,y) = exp(x-y) + x^2 + y^2; Dfx = diff(f, x) D2fx = diff(Dfx,x) Dfy = diff(f, y) D2fy = diff(D...

6 years ago | 1

| accepted

Answered
Finding the closed form solution to a system of second order differential equations
A closed-form solution is likely not possible because both differential equations are nonlinear, specifically: (0.125*sin(y)*(...

6 years ago | 0

| accepted

Answered
Averaging minute data to hour data
Try this: D = load('bjcoo001-2015-01-01.txt'); M = ceil(D(:,1)+1E-4); HrMeans = accumarray(M, (1:numel(M)).', [], @(x){mean(...

6 years ago | 0

| accepted

Answered
Graph plotting HELP NEEDED
Try this: x = linspace(-1, 3); y = 2*((x >= 0) & (x < 1)) + 1*((x >= 1) & (x < 2)); figure stairs(x, y) grid axis([-1 ...

6 years ago | 0

| accepted

Answered
Creating Caps to close a tubular structure
I cannot run your code. Adapt this to your cylinder: D = 10; [X,Y,Z] = cylinder(D); r = D; ang = linspace(0, 2*pi); x...

6 years ago | 0

| accepted

Answered
New variable creation in matlab
It is certainly possible to create variables inside a function. As with other variables, each needs to be assigned a value befo...

6 years ago | 0

Answered
How to quickly find the index of each integer in an ascend array?
Use the unique function: A = [1 1 1 1 1 2 2 3 3 3 3 3 4 4 4 5 5 5 5 6 7 7 7 8 8]; [Au,firstidx] = unique(A(:), 'stable'); ...

6 years ago | 0

| accepted

Answered
Suppress the unwanted signal
Use the bandstop function to remove the p[art of the spectrum you do not want. You should have it, since it was introduced in R...

6 years ago | 0

Answered
How to shade area between three lines?
I believe there is an error in your description. Try this interpretation of what I believe you intend: x = linspace(0, 50);...

6 years ago | 1

| accepted

Answered
Text in plot with symbol and fractions
Try this: str1={['$x(\infty)=',num2str(y(1,end),'%1.4f'),'$'], ['$1 -\frac{1}{\alpha(2)}=',num2str(yt,'%9.4f') '$']}; text(0....

6 years ago | 1

| accepted

Answered
Importing data from my excel with similar title
I would use the readtable function. See the documentation sections on ReadVariableNames and PreserveVariableNames to see which ...

6 years ago | 0

Answered
Least-Squares Approach to Determine Coefficients of Calibration Function (Hot Wire Anemometry Data)
It appears to be a polynomial regression in powers of ‘E’. See if the polyfit function will do what you want. (If so, pay clos...

6 years ago | 0

Answered
How can I convert this 2D graph to 3D?
Try this (with your own data for ‘y’): x = 1:14; y = [5 5 5 7 9 11 14 14 14 11 7 5 5 5]; figure surf(x, y, ones(numel(x),...

6 years ago | 1

| accepted

Answered
In documentation it says mod(a,m) will give the remainder of a/m with example mod(23,5) = 3. However 23/5 is 4.6, 4 with a remainder 6 not 3. Whats going on here?
You are misinterpreting the mod function. Illustrating — num = 23 den = 5 quotient = fix(num/den) modulus = num - quoti...

6 years ago | 0

| accepted

Answered
Merge two column in the table
One approach: T1 = readtable('test.txt'); T1.Var1 = datetime(T1.Var1, 'InputFormat','yyyy/MM/dd'); T1.Var1 = T1.Var1 + T1.Va...

6 years ago | 0

| accepted

Answered
Bode function - poles and zeros
The pzplot function: s = tf('s'); G = 1/(2*(s*1E-2)*(1+s*1E-2)); bode(G) [ma...

6 years ago | 0

| accepted

Answered
Graph not showing up
Use the axis function to see it: a=9; b=2; c=5; d=5; x=[ a a a b b c]; y=[ b c d c d d]; plot(x,y) axis([0 10 0 6]) ...

6 years ago | 1

Answered
How to fit two data sets, y1 and y2, to different functions with shared parameters.
This problems requires lsqcurvefit since the fit is to a matrix and not vector dependent variables: y1 = rand(10,1); ...

6 years ago | 0

Answered
Go from Local Time to UTC with respect to the dates I have!
The data in your Excel file need a bit of preprocessing, then the conversion is straightforward: D = readtable('Date-Time.xlsx...

6 years ago | 0

| accepted

Answered
Filling with colour the space inside object
Perhaps you can adapt the solution in: fill area between two polar curves to your problem.

6 years ago | 0

| accepted

Answered
How to plot multiple curves in the same graph window?
Try this: J=20.48*10e-6; b=0.702; kt=14.70; kb=0.48; R=1.6; L=0.02*0.001; num=kt; den=[(J*L) ((J*R)+(L*b)) ((b*R)+(kb*k...

6 years ago | 0

| accepted

Load more