Answered
Average of evey nth row of a large matrix
To average every nth row: a=rand(100,10); n = 10; mean(a(1:n:height(a),:),2) But I think you want the average of the first...

4 years ago | 0

| accepted

Answered
index exceeds the number of array elements?
The line of code: dFForward=(F(2:n)-F(1:n-1))/h; looks for F ranging from 2:n. n is 27, length(F) is 26. You've requested the 27...

4 years ago | 0

| accepted

Answered
How to see the plot of the desired matrix through the figure statement?
Tables actually make this very easy, because you can refer to the variable names. But you can also index as you did in your exam...

4 years ago | 0

| accepted

Answered
Performing multiple Operating system commands in a loop
When you use ! it will treat everything after as text, it won't evaluate RR(k).in Assuming RR(k).in is a string or char: sy...

4 years ago | 0

| accepted

Answered
how to access elements of a vector inside a cell array
The length part should return the entire contents of the cell, so your code looks fine to me. Inside the loop you'd refer to the...

4 years ago | 0

| accepted

Answered
How to save plot graphs as binary image with 64x64x1 dimensions in matlab
You could use getframe to get a matrix representing the image x = linspace(-2*pi,2*pi); y1 = i*j*sin(x); y2 = i*j*cos(x); pl...

4 years ago | 1

Answered
Sorting out raw index from raw data
A trick to these kinds of problems is to combine find and diff, diff is good at marking the transitions between states and find ...

4 years ago | 0

| accepted

Answered
Moving data within a struct: shifting from one cell to another cell with multiple repetitions.
I think I follow your question, a few pro tips: If you can make your question less about your example and more about the abstra...

4 years ago | 0

Answered
How can I timely recieve the simulation results via email
There are some instructions here for sending email if you have an SMTP server that supports POP or IMAP: https://www.mathworks....

4 years ago | 0

| accepted

Answered
How to add minor ticks to a time series
You can control the minor tick spacing with the MinorTickValues property with the XAxis property on the Axes... % some fake dat...

4 years ago | 1

| accepted

Answered
Add multiple legends to graph
You can't (easily) make multiple legends, but you can make a 'fake' legend by including some objects in your chart that have NaN...

4 years ago | 0

| accepted

Answered
What's an efficient way to pick a specific slice in a high dimensional array
That's a scary looking array! Not sure how slick it is, but if you're looking to turn those 6 colons into a number 6, you can...

4 years ago | 1

| accepted

Answered
error in my modified auto-contrast function
Your bug: c starts at 0, matlab indexing is one based, you're referring to c(0) but that's not allowed. Consider: this is a ...

4 years ago | 0

Answered
How extract the value in certain position for a loop in matlab?
I think what you're asking is for a vector with the second digit of the values in y? Here's a fixed version of your code: ID =...

4 years ago | 0

| accepted

Answered
Contact details for Matlab Training
https://www.mathworks.com/services/training/contact-training.html

4 years ago | 1

Answered
How to create more bubbles/balls in the figure legend?
There's no option to make bubblelegend with more than 3 bubbles. You can sort of fake it by making a separate bubblechart in a s...

4 years ago | 1

| accepted

Answered
Ignoring certain matrix entries with surf plot
A few solutions come to mind that all take advantage of interpolation, depending on how 'ignore' is interpreted (I used NaN but ...

4 years ago | 1

| accepted

Answered
How to add a title for any subplot in addition to a subplot title?
You can do this sort of thing with tiledlayout instead of subplot, taking advantage of nested layouts: t = tiledlayout(3,1); %...

4 years ago | 1

| accepted

Answered
How can I extract quickly the numbers separated my commas and parenthesis from a txt file?
It's not the most elegant solution, but as you said 'quickly' :) a=readmatrix('test.txt',"Whitespace",'(','Delimiter',{')' ','}...

4 years ago | 0

| accepted

Answered
uitable with latex or greek letters
Starting in R2022a, the Interpreter property is supported in uistyle. Previous answer (Aug 9, 2021) I believe html tags are ...

4 years ago | 1

| accepted

Answered
Can anyone help me with this error?
giuliayearlyDELTA2.Year is a char array, so giuliayearlyDELTA2.Year(1) is '0', and you're calling datetime on that value. Som...

4 years ago | 0

| accepted

Answered
How do I use the figure window tools to select a curve from multiple superimposed curves in a plot?
You can use the Plot Browser for this. Click View/Plot Browser and you'll see a list of objects in your axes. When you click on ...

4 years ago | 2

| accepted

Answered
Resample produces unexpected vector length
I think the error is in your arithmetic (?) 1228446 / 61423 1228460 / 61423

4 years ago | 0

| accepted

Answered
Adjust the vertical and horizontal alignment of the label of xline function
This would be much easier to diagnose if you put your code in the question instead of a picture, but I belive you used a number ...

4 years ago | 1

| accepted

Answered
How to draw exponential function in matlab
It seems like you listed a couple of functions, were you looking to plot them separately? Can plot the functions using fplot...

4 years ago | 0

Answered
Struggling with fft of a signal.
As signal was defined with signal=readtable(... I bet signal is a table, I think you want to pass in one of the listed types to ...

4 years ago | 0

| accepted

Answered
Print vectorized graphic of patches without edges
Using exportgraphics might do a little better. exportgraphics(f,'mypdf2.pdf','ContentType','Vector') Looks better to me, altho...

4 years ago | 0

Answered
Problem in using datetime
The H in your format is referring to a 24-hour clock hour, as in 14 to represent 2pm, but that doesn't make sense as you're also...

4 years ago | 1

| accepted

Answered
Error updating Scatter: Data lengths must match - but they do...
@Megan Jurczak: I bet this is SizeData, you're setting it initially to: ones(sum(gnss.tow == slide(1)),1)*25 So it matches th...

4 years ago | 1

| accepted

Answered
Figure in mlapp appears in front
Do you mean in App Designer? If you right click on the image, there's an option "Reorder" and from there you can select "Send To...

4 years ago | 1

Load more