Respondida
Is there a smarter way to plot this polygon series?
If you have five datasets: for k = 1:5 data = load(['dataset',num2str(k),'.txt']); plot(data(:,1),data(:,2),'...

más de 9 años hace | 0

| aceptada

Respondida
how to combine strfind and index in one line?
You could use |regexp| with the |'once'| option. For example, for this string: str = ['Soldiers! Don''t give yourselv...

más de 9 años hace | 1

Respondida
Using scatterm to plot points on Globe Projection of world map (spherical)
You pose the question well. I was able to replicate the problem. Here's a fix: mstruct = gcm; [x,y,z] = mfwdtran(mstru...

más de 9 años hace | 0

| aceptada

Respondida
Write a MATLAB function that accepts as input a set of {
function myfunction(varargin) %MYFUNCTION accepts as input a set of { end

más de 9 años hace | 0

Respondida
Convert 1 min average data to hourly average data
If you can get time into datenum format, <https://www.mathworks.com/matlabcentral/fileexchange/48361-downsample-ts/content/downs...

más de 9 años hace | 0

Respondida
How to create a map of UK with circles plotted at certain locations?
Here's how you can do it with my <https://www.mathworks.com/matlabcentral/fileexchange/48122-circlem/content/circlem/html/circle...

más de 9 años hace | 1

| aceptada

Respondida
How to read the RGB value from a grayscale image (just like the data cursor does)
Alternatively, I wrote a function for this a while back. It's been a while since I wrote it, so no guarantees regarding how wel...

más de 9 años hace | 0

Respondida
How to graph irrational functions
You can fix that error by including the |.| when you multiply or compute the exponent: k = (s-2)./(-s.^2-s+6); But noth...

más de 9 años hace | 0

Respondida
Inner loop not working
Perhaps you need to move the |b=0| after |i=1:1001|: for i=1:1001 b=0; for k=0:n

más de 9 años hace | 1

Respondida
How to Plot and graph
You'll have to create data arrays containing theta and V values. To get you started, theta = [0 20 45]; V = [12.7 15 ...

más de 9 años hace | 1

| aceptada

Respondida
Is there a command or function to "autocorrect" words in a sentence? Such as correcting the sentence "Teh cow jumped over the mono." to "The" and "moon".
You could create a list of commonly misspelled words and corresponding correct spellings. For example, str = 'Teh cow...

más de 9 años hace | 0

| aceptada

Respondida
comments line change automatically
Does my <https://www.mathworks.com/matlabcentral/fileexchange/53176-wraptext/content/wraptext/html/wraptext_documentation.html |...

más de 9 años hace | 1

Respondida
Overlap two pcolor with different color and set up transparency
What about this? % Some sample data: [X,Y,Z1] = peaks; Z2 = flipud(Z1); % Blue layer: p1 = surf(X,Y,z...

más de 9 años hace | 1

| aceptada

Respondida
second order finite difference scheme
There's no need for the (t) when you define y(t). Same with dfdx. Also, make sure you change dfdx(1) in the loop to dfdx(i). ...

más de 9 años hace | 0

| aceptada

Respondida
Trimimg a geotiff by a shapefile
You can use <https://www.mathworks.com/matlabcentral/fileexchange/46904-geoimread/content/html/geoimread_documentation.html |geo...

más de 9 años hace | 1

| aceptada

Enviada


imagescn
imagesc with transparent NaNs.

más de 9 años hace | 6 descargas |

5.0 / 5
Thumbnail

Respondida
Need to get the pixel values based on the directions(North, South,East,West) in to four arrays
Your question is not very clear. If I am interpreting your question correctly, Awest = A(3:8,4); Anorth = A(3,5:8); ...

más de 9 años hace | 1

Respondida
Concatenante struture contents into a new one
This'll do it: in.ID = [1,2,3,4,5]; in.names={'John','Peter','Rick','Mick','Pat'}; for k = 1:length(in.ID) ...

más de 9 años hace | 0

Respondida
Linear regression : estimate the parameters
Use <https://www.mathworks.com/help/matlab/ref/polyfit.html |polyfit|>. p = polyfit(x,y,1); beta1 = p(2); beta2 = ...

más de 9 años hace | 0

| aceptada

Respondida
how to stop while loop by right mouse button click
From an <https://www.mathworks.com/matlabcentral/answers/51943-returning-which-button-was-pressed old answer by Jose-Luis>, ...

más de 9 años hace | 0

Respondida
I have a problem with fillm command using stereographic projection near boundary of longitude=0.
Ah, yes, I've encountered this problem before. This is a workaround: % Convert to map coordinates after calling axesm: ...

más de 9 años hace | 0

| aceptada

Respondida
How can i amelirate the smooth of this curve ?
% Your data: rload=[100;1e3;10e3;100e3;1e6;10e6]; power_hs=[1.570642571; 15.23486212; 1.12E+02; 1.37E+02; 81.69126068; ...

más de 9 años hace | 0

| aceptada

Respondida
Loops to determine what is in certain ranges from data
Renae: Given that you're new to Matlab, perhaps an explanation of Stephen's solution will help. First he created |X| as a rando...

más de 9 años hace | 0

| aceptada

Respondida
Formatting the x-axis of a scatter plot
Indeed, the x values were left out, so it was plotting you ones and zeros on an x scale of 1 to 23, because you have 23 data poi...

más de 9 años hace | 0

| aceptada

Respondida
hi, i'm trying to flip an image without any built in commands that is using for loops.
If you want to flip it vertically (equivalent to <https://www.mathworks.com/help/matlab/ref/flipud.html |flipud|>), you'd only n...

más de 9 años hace | 5

Respondida
Plot a 3D matrix for a three-dimensional object
Hi Yuzhen, Are the x and y values evenly spaced, or are they randomly scattered about? If the x and y values are evenly spac...

más de 9 años hace | 1

Respondida
which one will be for x_direction and y_direction
It is probable that the first column corresponds to x and the second column corresponds to y.

más de 9 años hace | 0

| aceptada

Respondida
How do I enter the theta symbol?
Your question is unclear. Do you mean you want it in a title or a label? Try xlabel(' this is a theta \theta ')

más de 9 años hace | 1

| aceptada

Respondida
How can I adjust the data aspect ratio in a plot with two y axes?
I'd set the limits of each axis individually, something like this: % some data: t = 1:12; T = 20*sin(pi*t/12); ...

más de 9 años hace | 1

| aceptada

Respondida
mapprofile used on a projected map
If you have a 2D projected map and its corresponding x,y coordinates, you can use |interp2| to interpolate along any path you wi...

más de 9 años hace | 0

Cargar más