Answered
Why can´t plot a line avoinding repeated lines?
What do you expect? A single line or multiple line series? Your line looks the way it does because your X values are not linear...

5 years ago | 0

| accepted

Answered
how to give pulse width for sawtooth wave
From the documentation: x = sawtooth(t) generates a sawtooth wave with period 2π for the elements of the time ar...

5 years ago | 0

Answered
text in plot with latex interpreter
Because sprintf interprets '\r' as a carriage return. Use '\\r' instead. text(.1,.5,sprintf('$$c_{[\\rho_{e}]_w^m}$$= %.3f',18....

5 years ago | 1

| accepted

Answered
How to change XColor and YColor in heatmap plot?
Actually, the code you share does give an error. You have to plot before you set axis color. You could also use the axis off com...

5 years ago | 1

Answered
Converting HH:MM:SS into decimal days to make a time series
Use a datetime. When you plot, your data type is honored. You can use xtickformat to format how the data appears. % Define date...

5 years ago | 0

| accepted

Answered
Function to store values??
I suggest going through MATLAB Onramp. Ch 5 and Ch 13 are probably of particular relevance here.

5 years ago | 0

Answered
Labeling multiple line plots
I'd do something like this. Percent = ["5%" "10%" "20%" "30%" "40%" "50%" "60%" "70%"]; Quantity = [800 1300 1800 2300 2900 33...

5 years ago | 0

Answered
How can I convert a 1-dimensional array to a timetable?
What about making it a timetable before you convert it to a tall array? load('EEGdataset1.mat') % file contains array called EE...

5 years ago | 0

| accepted

Answered
Hi I have a problem trying to make a loop
Ch 13 of MATLAB Onramp.

5 years ago | 0

Answered
extremely bad performance of event issuing by slider uicontrol in version R2020b
Your code runs smoothly for me in 20b and 21a prerelease. Times are Time since last event: 0.04 s Time since last event: 0....

5 years ago | 0

Answered
MATLAB ONLINE not opening
Make sure you browser meets the browser requirements listed here. You could also try the solution provided here.

5 years ago | 1

Answered
Change the data from table format to double format
See this link on how to import a spreadsheet into MATLAB. See this page for instructions on how to access data in a MATLAB tabl...

5 years ago | 1

Answered
Issues with ylim?
You have apparently created a variable ylim at some point in your code, which has replaced the ylim function in MATLAB. Type cl...

5 years ago | 2

| accepted

Answered
How to relate two data by time code?
I don't know what your data looks like, but can you convert your tables to timetables and then use the retime function?

5 years ago | 0

Answered
get value from matrix
Ch 5 of MATLAB Onramp

5 years ago | 1

| accepted

Answered
save data file without movefile
Include the full path in your file name when you save the file. You can use the function fullfile to help you combine your path...

5 years ago | 0

| accepted

Answered
Loop for removing values from a column vector
I would do this with logical indexing. column_vector = [1 2 1 3 7 7 5 4 8 6 9 2]; logInd = [1 diff(column_vector)]>0; % Since ...

5 years ago | 1

| accepted

Answered
Index exceeds the number of array elements (2). Error in Hindawi_Extract (line 20) msg=strcat(msg,num2str(m1(loop)));
Let's break down the error message. "Index exceeds the number of array elements (2). Error in Hindawi_Extract (line 20) msg=str...

5 years ago | 0

Answered
managing surface plot axis
Have you tried using your X data as the surface color input C? Adapting this doc example. [X,Y] = meshgrid(1:0.5:10,1:20); Z =...

5 years ago | 0

| accepted

Answered
How to find the absolute value?
The most concise was is to take the absolute value of the entire array in one step. a = [-1 3 -4 5]; a=abs(a)

5 years ago | 0

| accepted

Answered
Cannot load simple STL file
The issue is the shared wall between your two cuboids. The inner volume must be completely open. This comes up all the time in 3...

5 years ago | 0

| accepted

Answered
Splitapply array to fit distributions
You are close. You need to use findgroups to create your grouping variable G. Then it's just a matter of setting up your functio...

5 years ago | 0

| accepted

Answered
Issue creating a map of the USA
You can see an example here. figure ax = usamap('all'); set(ax, 'Visible', 'off') states = shaperead('usastatelo', 'UseGeoCo...

5 years ago | 1

| accepted

Answered
why are if statements not working?
For an if statement to work as exepcted, the conditional statement must return a single logical result. Yours is returning a res...

5 years ago | 0

Answered
MATLAB keeps asking for activation
Contact customer support.

5 years ago | 0

Answered
Why won't my while loop terminate?
Because forceErr is never <= 0.1. Your while loop is actually unnecessary here. It doesn't add to the solution. It will just r...

5 years ago | 1

| accepted

Answered
How can I add a trendline?
What type of fit do you need? What is making the fit in Excel horrible? If you have the Curve Fitting toolbox, look into fit. ...

5 years ago | 0

Answered
How can I do a scatter plot with different color and symbols
X = 0:4; Y = 5:9; Z = [ -1 2 -3 4]; ind = Z>=0; scatter(X(ind),Y(ind),'r','filled','d'); hold on scatter(X(~ind),Y(~ind),...

5 years ago | 0

| accepted

Answered
error using linspace: input must be scalars
You define sigma as a vector (12 numbers). In linspace, your input is sigma multiplied by 0.95 or 2.5. This only scales the valu...

5 years ago | 1

| accepted

Answered
add a vector as a timetable element
A column for each time? Do you mean row? Just add it as a new variable in your timetable. Each column is typically a separate ...

5 years ago | 0

| accepted

Load more