Answered

Combining Graphs into one Figure

The command figure makes a new figure, so just remove the second call to figure and you should be in good shape! %% Part 1 ...

Combining Graphs into one Figure

The command figure makes a new figure, so just remove the second call to figure and you should be in good shape! %% Part 1 ...

7 dagen ago | 0

Answered

What is the exact reason of this error? I am not getting it. Any help will be appreciated.

As @Mathieu NOE points out, there's something a little strange in your col_headers = line. This line has a bunch of extra charac...

What is the exact reason of this error? I am not getting it. Any help will be appreciated.

As @Mathieu NOE points out, there's something a little strange in your col_headers = line. This line has a bunch of extra charac...

8 dagen ago | 0

Answered

Merging three 3D plots into one

You can copy the surfaces from each of the axes, in each of the figures that you open like this: a=open('BandL_my_replication_v...

Merging three 3D plots into one

You can copy the surfaces from each of the axes, in each of the figures that you open like this: a=open('BandL_my_replication_v...

8 dagen ago | 0

| accepted

Answered

Issues with greyscale png images in matlab

This looks like the result of loading an indexed image, you can read the colormap using the second output of imread: [img,cmap]...

Issues with greyscale png images in matlab

This looks like the result of loading an indexed image, you can read the colormap using the second output of imread: [img,cmap]...

8 dagen ago | 0

| accepted

Answered

My line plot is not showing

Did you want to plot 1:Ns vs p (without the i)? plot(1:Ns,p)

My line plot is not showing

Did you want to plot 1:Ns vs p (without the i)? plot(1:Ns,p)

8 dagen ago | 0

| accepted

Answered

How to combine multiple images into an array

You can convert a 'greyscale' RGB image to a 2D image in a few ways. For instance: you could just take one channel (like the red...

How to combine multiple images into an array

You can convert a 'greyscale' RGB image to a 2D image in a few ways. For instance: you could just take one channel (like the red...

8 dagen ago | 0

| accepted

Answered

Multiple 3D trajectories displayed on same axis

There's a typo in your code: x1_2 = rmmissing(x1); y1_2 = rmmissing(y1); z1_2 = rmmissing(z1); x2_2 = rmmissing(x1); y2_2 =...

Multiple 3D trajectories displayed on same axis

There's a typo in your code: x1_2 = rmmissing(x1); y1_2 = rmmissing(y1); z1_2 = rmmissing(z1); x2_2 = rmmissing(x1); y2_2 =...

8 dagen ago | 0

| accepted

Answered

Incomplete Normal Distribution Plot on MATLAB

The function normpdf(x,mu,sigma) will return the pdf of the normal distribution with mean mu and standard deviation sigma, evalu...

Incomplete Normal Distribution Plot on MATLAB

The function normpdf(x,mu,sigma) will return the pdf of the normal distribution with mean mu and standard deviation sigma, evalu...

8 dagen ago | 0

Answered

How can I calculate log10(variable) ??? there is error..

Assuming you've defined your variable and it's numeric, this should work: variable=100; log10(variable) x=[100 200 500 1000];...

How can I calculate log10(variable) ??? there is error..

Assuming you've defined your variable and it's numeric, this should work: variable=100; log10(variable) x=[100 200 500 1000];...

8 dagen ago | 0

| accepted

Answered

Convert Python time to Matlab datum

Python has several ways it represents time. A common one is so called unix timestamps, which are the number of seconds since 197...

Convert Python time to Matlab datum

Python has several ways it represents time. A common one is so called unix timestamps, which are the number of seconds since 197...

11 dagen ago | 1

| accepted

Answered

error when using datetime()

Does it work if you add str2double? like this: S.date = datetime(S.Year, S.Month, str2double(S.Day), 0, 0, 0, 'Format', 'uuuuMM...

error when using datetime()

Does it work if you add str2double? like this: S.date = datetime(S.Year, S.Month, str2double(S.Day), 0, 0, 0, 'Format', 'uuuuMM...

11 dagen ago | 0

| accepted

Answered

How can I build a matrix with an increasing number of terms in each row?

You can't have a matrix with a different number of elements on each row, but if you wanted the sums 1, 1+2, 1+2+3,... (as you de...

How can I build a matrix with an increasing number of terms in each row?

You can't have a matrix with a different number of elements on each row, but if you wanted the sums 1, 1+2, 1+2+3,... (as you de...

11 dagen ago | 0

| accepted

Answered

Call fields from a struct

I'm a little confused, but I'll venture some guesses.... Do you have a struct init in your workspace (where you're calling th...

Call fields from a struct

I'm a little confused, but I'll venture some guesses.... Do you have a struct init in your workspace (where you're calling th...

11 dagen ago | 0

Answered

surf command doesn't plot the value next to NaNs values

If you think of surf as defining a bunch of little rectangles, when one vertex is missing you can't draw the rectangle. Your d...

surf command doesn't plot the value next to NaNs values

If you think of surf as defining a bunch of little rectangles, when one vertex is missing you can't draw the rectangle. Your d...

11 dagen ago | 1

| accepted

Answered

Printing cell array with skipping a value

If you want to get rid of just the one value, how about setting it to empty inside of matComp. Note that you'll end up with one ...

Printing cell array with skipping a value

If you want to get rid of just the one value, how about setting it to empty inside of matComp. Note that you'll end up with one ...

12 dagen ago | 0

| accepted

Answered

tiledlayout not forming figures as intended

Just pasting my comment in the answer in case it may help someone else, it struck me as strange that there was a hold on before ...

tiledlayout not forming figures as intended

Just pasting my comment in the answer in case it may help someone else, it struck me as strange that there was a hold on before ...

12 dagen ago | 0

Answered

Specifying a sample of data from a table

This sounds like a pretty broad topic, how to index things in MATLAB. You might be interested in this documentation page abou...

Specifying a sample of data from a table

This sounds like a pretty broad topic, how to index things in MATLAB. You might be interested in this documentation page abou...

12 dagen ago | 0

Answered

How to save a figure of a specific size with exportgraphics

you created a tiledlayout in one figure, set some of its characteristics but didn't add anything to it. Then you created a new f...

How to save a figure of a specific size with exportgraphics

you created a tiledlayout in one figure, set some of its characteristics but didn't add anything to it. Then you created a new f...

12 dagen ago | 0

| accepted

Answered

Saving a functiong graph inside a matrix

You can use im2gray to convert an RGB matrix to grayscale: x = linspace(-5,5,100); y = x.^2; plot(x,y) fr=getframe(gca); gr...

Saving a functiong graph inside a matrix

You can use im2gray to convert an RGB matrix to grayscale: x = linspace(-5,5,100); y = x.^2; plot(x,y) fr=getframe(gca); gr...

12 dagen ago | 1

Answered

add arrowtext outside the figure

annotations are defined with respect to the figure, in the units of the figure. plot(rand(1,10)) pos=get(gca,'Position') o...

add arrowtext outside the figure

annotations are defined with respect to the figure, in the units of the figure. plot(rand(1,10)) pos=get(gca,'Position') o...

13 dagen ago | 0

Answered

what does thegrid{1}.points=(1:n); mean?

Cell arrays are containers for heterogenous data, each cell can hold arbitrary types/sizes/shapes. Cells are addressed with { } ...

what does thegrid{1}.points=(1:n); mean?

Cell arrays are containers for heterogenous data, each cell can hold arbitrary types/sizes/shapes. Cells are addressed with { } ...

13 dagen ago | 1

Answered

How to make a plot in function of timetables expressed in UTC ?

It's probably easier if you use readtable instead of load, which will pull in the times automatically: t=readtable('Dates.txt')...

How to make a plot in function of timetables expressed in UTC ?

It's probably easier if you use readtable instead of load, which will pull in the times automatically: t=readtable('Dates.txt')...

13 dagen ago | 1

| accepted

Answered

Google sheets to table in matlab

You might try this file exchange submission: https://www.mathworks.com/matlabcentral/fileexchange/39915-getgooglespreadsheet An...

Google sheets to table in matlab

You might try this file exchange submission: https://www.mathworks.com/matlabcentral/fileexchange/39915-getgooglespreadsheet An...

13 dagen ago | 0

Answered

Why is my plot not working in my for loop?

this isn't running a loop because you're iterating from 1 to length(theta2) and length(theta2) is 0 theta2=linspace(0,2*pi,2*pi...

Why is my plot not working in my for loop?

this isn't running a loop because you're iterating from 1 to length(theta2) and length(theta2) is 0 theta2=linspace(0,2*pi,2*pi...

13 dagen ago | 0

Answered

Polymarker geographic contour plot

Yes this is possible. I wouldn't call this a contour plot, it's really more like a bubble plot. You can't make triangles with...

Polymarker geographic contour plot

Yes this is possible. I wouldn't call this a contour plot, it's really more like a bubble plot. You can't make triangles with...

13 dagen ago | 0

| accepted

Answered

if or for loop

You can find the index of the first and last instance of power greater than 0 using the find function, then put those indices ri...

if or for loop

You can find the index of the first and last instance of power greater than 0 using the find function, then put those indices ri...

13 dagen ago | 0

| accepted

Answered

A function that counts the number of zeros in a vector

you were pretty close, you just didn't need the find, or the /11 D = [ 1 0 1 0 1 0 1 0 1 ...

A function that counts the number of zeros in a vector

you were pretty close, you just didn't need the find, or the /11 D = [ 1 0 1 0 1 0 1 0 1 ...

13 dagen ago | 1

Answered

How to call one of two conditions in matlab function?

When you call a function with one output MATLAB will return the first output, the names specified for outputs when calling it ar...

How to call one of two conditions in matlab function?

When you call a function with one output MATLAB will return the first output, the names specified for outputs when calling it ar...

13 dagen ago | 0

| accepted

Answered

gunzip subfolders at once

You can pass wildcards to gunzip (note that the first example does exactly this): fp = 'C:\Main\Data\subf1\subf2\subf3\subf4\su...

gunzip subfolders at once

You can pass wildcards to gunzip (note that the first example does exactly this): fp = 'C:\Main\Data\subf1\subf2\subf3\subf4\su...

13 dagen ago | 0

| accepted

Answered

How do I fix axis labels and numbers?

I think you want your y-axis (which, because of your use of camroll is the horizontal axis) at the bottom. Because MATLAB still ...

How do I fix axis labels and numbers?

I think you want your y-axis (which, because of your use of camroll is the horizontal axis) at the bottom. Because MATLAB still ...

14 dagen ago | 0