Answered
How to add header to a table?
Use the 'VariableNames' (link) name-value pair with your ‘header’ cell array.

8 years ago | 2

| accepted

Answered
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
Your ‘x(i,i)’ references a single scalar value. To assign the result to a column of ‘x’, do this: x(:,i) = xl+(xu - xl).*rand...

8 years ago | 1

| accepted

Answered
How do I type 50 million on the command window
5E+7

8 years ago | 0

Answered
Outputting solutions to symbolic variables in a matrix.
Assuming the vector elements are not functions of symbolic variables (i.e. are purely numeric) see if using the double (link) fu...

8 years ago | 0

Answered
How can I stretch a line of best fit to the limits of my axes?
You simply need to concatenate a ‘0’ to ‘xrefract’ in the polyval and plot calls: lobf = polyval(poly,[0, xrefract]) and: p...

8 years ago | 0

| accepted

Answered
Find all points of intersection between two functions
There are only 2 real intersection points. To find them, you simply need to find out the x-values where the functions equal eac...

8 years ago | 0

Answered
Creating a linear plot over a plot of giving numbers
Try this: plot (x1,y1,'p') hold on plot([0 20], 3+0.5*[0 20]) hold off It’s a linear function, so you only need the limits...

8 years ago | 0

Answered
how to solve laplace transform problem in matlab
We do not know what you did to solve this. (Always post what you’ve already attempted.) However, if you got frustrated, that i...

8 years ago | 2

Answered
Writeing a stings using Matlab 2015
The standard output (The Command Window) has a file identification number = 1. So: fprintf(fid, 'Hello\nWorld\n') will pr...

8 years ago | 0

| accepted

Answered
Step Fucntion in Matlab
Since the unit step functrion is defined as being equal to 1 for , I would use: Ustp0 = @(t) (t >= 0); Ustp1 = @(t) 0.5*(t =...

8 years ago | 0

| accepted

Answered
How can I subs 2 symbolic vectors in 1 comand?
You defined ‘Z’ to require 4 different arguments, so the substitution has to match them, either using subs or using ‘Z’ as a fun...

8 years ago | 0

| accepted

Answered
Bathymetric data into a surface plot
Try this: [D,S] = xlsread('Bathymetric data (XYZ).xlsx'); Lon = D(:,1); Lat = D(:,2); Dep = D(:,3); figure plot3(Lon, L...

8 years ago | 2

| accepted

Answered
When I run the program inaccurate results appear What is the problem?
The best approach to this is likely not the vpasolve function, since it takes forever. I have no idea of these are the ‘accur...

8 years ago | 0

| accepted

Answered
About MATLAB R2018B update
I installed the R2018b Update3 yesterday and when I checked just now, it said that I was running the latest update. I suggest...

8 years ago | 0

| accepted

Answered
How I can Plots this function
Another approach: x = @(t) 3*exp(-2*t) .* (t >= 0); t = linspace(-10,10); figure plot(t, x(t))

8 years ago | 0

Answered
How to keep a patch object and its rotation in the same plot
Try this: x = [1 2 2 1]; y = [1 1 2 2]; figure bot = patch(x,y,'blue'); rotate(bot, [0 0 1], 45) hold on patch(x,y,'bl...

8 years ago | 0

| accepted

Answered
ellip is missing from Matlab
It you aree certain that you have it licensed and installed, you may have path problems. Run these lines (from a script or yo...

8 years ago | 0

Answered
For-if loop not working?
Lose the loop! Try this: A=[2 5 4 13 4 23 8 3 9 5 0]; [Maxima,MaxIdx]=findpeaks(A) Maximav = Maxima(Maxima > 10); Ma...

8 years ago | 0

| accepted

Answered
How to fit Phase type distribution to empirical data
It may be possible, although you would have to create your own distribution function. See the documentation on Probability Dis...

8 years ago | 0

Answered
How to use trapz for histogram?
Try this: a=[1,3,3,2,1,3,8,8,9,0,6,5,15,4,14,3,2,1,2,14]; aa = histogram(a,'Normalization','probability'); edgs = aa.BinEdge...

8 years ago | 0

| accepted

Answered
using strcmp for index
Try this: pos{x} = strcmp(trials{x},{'BLCU' 'BLCD'});

8 years ago | 0

Answered
plot integral equation coming from ode solver
Use the trapz (link) function: idx = find(t1 <= 0.42); final = trapz(t1(idx), Aout1(idx)) Since you menitoned cumsum, also s...

8 years ago | 0

| accepted

Answered
what type of plot is this?
See the documentation on the surf, axis, shading, view, and colormap functions.

8 years ago | 0

| accepted

Answered
Get all vectors with possible values of each elements
There are a number of funcitons you can use to optimise your funciton. See the documentation on Nonlinear Optimization (link) f...

8 years ago | 0

| accepted

Answered
How to remove the extra symbols in a box figure?
The red + symbols are ouitliers. You cannot eliminate them, however if you set their colours to white, you can make them effect...

8 years ago | 0

| accepted

Answered
How to find rearrange these values in a new row and column?
One approach: A = [1 2 2 3 3 4 ...

8 years ago | 0

| accepted

Answered
help plot the inequality
Straightforward: syms a b X Z assume(X > 0) assume(Z > 0) It does not appear to have any effect on the rest of your posted...

8 years ago | 0

Answered
Solve nonlinear equation with different parameters
Do something like this (although with the correct values for the constants): A = 13; B = 5; C = 7; D = 3; F = 11; V = 42;...

8 years ago | 0

| accepted

Answered
Subplots with axes of same scale but different lengths
I am not certain what you are asking. If you want all the subplots to have the same axis limits, use the axis (link) function. ...

8 years ago | 2

| accepted

Answered
What is wrong with my use of ode45?
There were a few problems in your code that I fixed. First, be very careful creating matrices such as you did in ‘odefcn’ bec...

8 years ago | 1

| accepted

Load more