Answered

How to display figure in full-screen mode programmatically and save as a high resolution image?

To save as high-resolution, I regularly use: print('-depsc2','-painters','J.eps') If you desperately want the image as a png-i...

How to display figure in full-screen mode programmatically and save as a high resolution image?

To save as high-resolution, I regularly use: print('-depsc2','-painters','J.eps') If you desperately want the image as a png-i...

4 months ago | 1

Answered

How to store 2D variables in matrix

For the storing the point coordinates you might look at either cell-arrays: r1 = [1,2,3]; r2 = [3,2,5]; r3 = [4.5,pi,1,5]; %...

How to store 2D variables in matrix

For the storing the point coordinates you might look at either cell-arrays: r1 = [1,2,3]; r2 = [3,2,5]; r3 = [4.5,pi,1,5]; %...

4 months ago | 0

Answered

Problem getting number of ticks and labels to work properly

Do you get your xticks at the even years with the xticklabels for the first 6 years? You can at least check the x-tick values w...

Problem getting number of ticks and labels to work properly

Do you get your xticks at the even years with the xticklabels for the first 6 years? You can at least check the x-tick values w...

4 months ago | 0

Answered

De-resolution of Dicom Image

So you problem is that you cannot figure out how to save a file to a new same-name file in another directory? If so something l...

De-resolution of Dicom Image

So you problem is that you cannot figure out how to save a file to a new same-name file in another directory? If so something l...

4 months ago | 0

Answered

A switch case statement that will help me to either run codeS in Windows or linux, based on whichever OS it is

Have a look at the commands: computer, ispc, insunix, ismac. HTH

A switch case statement that will help me to either run codeS in Windows or linux, based on whichever OS it is

Have a look at the commands: computer, ispc, insunix, ismac. HTH

4 months ago | 0

Answered

zoom plot into plot

Maybe this file exchange contribution does what you need: zoomplot Or any of these: on-figure-magnifier, maginset, interactiv...

zoom plot into plot

Maybe this file exchange contribution does what you need: zoomplot Or any of these: on-figure-magnifier, maginset, interactiv...

4 months ago | 0

Answered

How to find angle between two lines?

A more stable method that what Jos suggested is v_1 = [x2,y2,0] - [x1,y1,0]; v_2 = [x3,y3,0] - [x1,y1,0]; Theta = atan2(norm(...

How to find angle between two lines?

A more stable method that what Jos suggested is v_1 = [x2,y2,0] - [x1,y1,0]; v_2 = [x3,y3,0] - [x1,y1,0]; Theta = atan2(norm(...

4 months ago | 1

| accepted

Answered

Integrating function of t over numerical values

Yes, that means that the function you call integral with is called with an array of values - therefore your function (the long e...

Integrating function of t over numerical values

Yes, that means that the function you call integral with is called with an array of values - therefore your function (the long e...

4 months ago | 0

| accepted

Answered

Multiple color plots / colorbars on a single axes

There are some contributions on the file exchange that deals with this. I thik this is one: colormat-and-colorbar-utilities You...

Multiple color plots / colorbars on a single axes

There are some contributions on the file exchange that deals with this. I thik this is one: colormat-and-colorbar-utilities You...

4 months ago | 0

| accepted

Answered

Given 2 red beads, 2 blue beads, 1 yellow bead, and 1 green bead, how many different necklaces can be made?

Why not just remove the non-unique necklaces? See the help and documentation for unique for how to do this. HTH

Given 2 red beads, 2 blue beads, 1 yellow bead, and 1 green bead, how many different necklaces can be made?

Why not just remove the non-unique necklaces? See the help and documentation for unique for how to do this. HTH

4 months ago | 0

Answered

stream lines for discrete data set of velocities

Your question is a bit too vague. Or rather, the input-data you have is a bit vaguely described. The answer depends on how you'l...

stream lines for discrete data set of velocities

Your question is a bit too vague. Or rather, the input-data you have is a bit vaguely described. The answer depends on how you'l...

4 months ago | 0

| accepted

Answered

Is there a way to Un-clip a sine wave?

You can do something like this: sfcn = @(t,pars) pars(1)+pars(2)*sin(pars(3)*t+pars(end)); % sine-like function with offset and...

Is there a way to Un-clip a sine wave?

You can do something like this: sfcn = @(t,pars) pars(1)+pars(2)*sin(pars(3)*t+pars(end)); % sine-like function with offset and...

4 months ago | 0

| accepted

Answered

Plotting graph with variables on x axis

Something like this: y = randn(123,1); x = linspace(0,1,123); plot(x,y) xtstr = {'0','0.2d','0.4d','0.6d','0.8d','1d'}; set...

Plotting graph with variables on x axis

Something like this: y = randn(123,1); x = linspace(0,1,123); plot(x,y) xtstr = {'0','0.2d','0.4d','0.6d','0.8d','1d'}; set...

4 months ago | 0

| accepted

Answered

Dynamic model of a bending spring

Start reading up on the topic of beam-theory. Then come back with matlab or ODE/PDE-based questions which are more suitable for ...

Dynamic model of a bending spring

Start reading up on the topic of beam-theory. Then come back with matlab or ODE/PDE-based questions which are more suitable for ...

4 months ago | 0

Answered

How to assign to an already 3d surface a colormap based on a set of values ?

This is how I'd do this: surf(x,y,z,Temps),shading flat This you dont have to view from above. HTH

How to assign to an already 3d surface a colormap based on a set of values ?

This is how I'd do this: surf(x,y,z,Temps),shading flat This you dont have to view from above. HTH

4 months ago | 0

Answered

i want to fill zeros inbetween vector elements

Looks like you should turn to matlab's sparse arrays. Something like this should be a shortest-ish code-snippet to do what you n...

i want to fill zeros inbetween vector elements

Looks like you should turn to matlab's sparse arrays. Something like this should be a shortest-ish code-snippet to do what you n...

4 months ago | 0

Answered

Coherence as a function of time

Have a look at mscohere, and its help and documentation. It should allow you to calculate the coherence. My version resides in t...

Coherence as a function of time

Have a look at mscohere, and its help and documentation. It should allow you to calculate the coherence. My version resides in t...

4 months ago | 0

Answered

Using spectralFlux to plot Flux of a vector

It is not at all clear what you want to do, spectral flux is not a term I've heard before - this might be because I'm ignorant, ...

Using spectralFlux to plot Flux of a vector

It is not at all clear what you want to do, spectral flux is not a term I've heard before - this might be because I'm ignorant, ...

4 months ago | 0

Answered

matrix contain index track

Sure: I = [1, 3, 1, 4; 2, 3, 2, 4]; % Then operate away... But it is very unclear if that is what you really want. Do...

matrix contain index track

Sure: I = [1, 3, 1, 4; 2, 3, 2, 4]; % Then operate away... But it is very unclear if that is what you really want. Do...

5 months ago | 0

Answered

Problems with waitbar sizing

Have a look at this command-line progress-bar version. It is less visually intrusive when working with other stuff while matlab ...

Problems with waitbar sizing

Have a look at this command-line progress-bar version. It is less visually intrusive when working with other stuff while matlab ...

5 months ago | 0

Answered

Histogram with circular bars

I would do something like this: edges = 0:15:360; N_all(1,:) = histcounts(M1,edges);% Put one histogram per row into N_all N_...

Histogram with circular bars

I would do something like this: edges = 0:15:360; N_all(1,:) = histcounts(M1,edges);% Put one histogram per row into N_all N_...

5 months ago | 0

Answered

Unusual arrangement of plot

Seems like you want the plot done with the radii sorted? (plot plots what you feed it, if you have the x-variable unsorted the p...

Unusual arrangement of plot

Seems like you want the plot done with the radii sorted? (plot plots what you feed it, if you have the x-variable unsorted the p...

5 months ago | 1

Answered

How to find the square root fo complex square

What's wrong with: sqrtZ = sqrt(Z); ? Then possibly work out the other root if necessary. HTH

How to find the square root fo complex square

What's wrong with: sqrtZ = sqrt(Z); ? Then possibly work out the other root if necessary. HTH

5 months ago | 0

Answered

Problem implementing finite difference method at edges of periodic functions

What I'd usualy have to do in this situation is to extract the differentiation matrices - just to check that all elements become...

Problem implementing finite difference method at edges of periodic functions

What I'd usualy have to do in this situation is to extract the differentiation matrices - just to check that all elements become...

5 months ago | 0

Answered

What starting point to choose so fsolve always returns a solution when any exists?

This depends on how you have parameterized your surface. For the most general case (curve - circle), where you have a curve para...

What starting point to choose so fsolve always returns a solution when any exists?

This depends on how you have parameterized your surface. For the most general case (curve - circle), where you have a curve para...

5 months ago | 1

Answered

How does MATLAB deal with wanted linear dependencies?

That's not the problem. What you should look at is how "wellconditioned" your model-matrix X is. Look at this example: [x,y] = ...

How does MATLAB deal with wanted linear dependencies?

That's not the problem. What you should look at is how "wellconditioned" your model-matrix X is. Look at this example: [x,y] = ...

5 months ago | 0

Answered

create freehand region of interest

Have a look at ginput (there are a couple of improved/modified versions on the file exchange), that function should give you the...

create freehand region of interest

Have a look at ginput (there are a couple of improved/modified versions on the file exchange), that function should give you the...

5 months ago | 0

Answered

What is the best way to animate a rocket trajectory through matlab?

I would look for some of the arrow-contributions on the file exchange: Arrow3, arrow - and then simply loop over time calculate ...

What is the best way to animate a rocket trajectory through matlab?

I would look for some of the arrow-contributions on the file exchange: Arrow3, arrow - and then simply loop over time calculate ...

5 months ago | 1

Answered

How to make a common color bar?

This is how I do this neatly: subplot(1,1,1) cbh = colorbar_labeled(''); subplot(2,2,3) plot([0 2]) subplot(2,2,2) imagesc...

How to make a common color bar?

This is how I do this neatly: subplot(1,1,1) cbh = colorbar_labeled(''); subplot(2,2,3) plot([0 2]) subplot(2,2,2) imagesc...

5 months ago | 0

| accepted