Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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 ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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....

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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 =...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Contact details for Matlab Training
https://www.mathworks.com/services/training/contact-training.html

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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); %...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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',{')' ','}...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 2

| A accepté

Réponse apportée
Resample produces unexpected vector length
I think the error is in your arithmetic (?) 1228446 / 61423 1228460 / 61423

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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 ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

Charger plus