답변 있음
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),'...

9년 초과 전 | 0

| 수락됨

답변 있음
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...

9년 초과 전 | 1

답변 있음
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...

9년 초과 전 | 0

| 수락됨

답변 있음
Write a MATLAB function that accepts as input a set of {
function myfunction(varargin) %MYFUNCTION accepts as input a set of { end

9년 초과 전 | 0

답변 있음
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...

9년 초과 전 | 0

답변 있음
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...

9년 초과 전 | 1

| 수락됨

답변 있음
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...

9년 초과 전 | 0

답변 있음
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...

9년 초과 전 | 0

답변 있음
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

9년 초과 전 | 1

답변 있음
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 ...

9년 초과 전 | 1

| 수락됨

답변 있음
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...

9년 초과 전 | 0

| 수락됨

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

9년 초과 전 | 1

답변 있음
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...

9년 초과 전 | 1

| 수락됨

답변 있음
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). ...

9년 초과 전 | 0

| 수락됨

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

9년 초과 전 | 1

| 수락됨

제출됨


imagescn
imagesc with transparent NaNs.

9년 초과 전 | 다운로드 수: 6 |

5.0 / 5
Thumbnail

답변 있음
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); ...

9년 초과 전 | 1

답변 있음
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) ...

9년 초과 전 | 0

답변 있음
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 = ...

9년 초과 전 | 0

| 수락됨

답변 있음
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>, ...

9년 초과 전 | 0

답변 있음
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: ...

9년 초과 전 | 0

| 수락됨

답변 있음
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; ...

9년 초과 전 | 0

| 수락됨

답변 있음
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...

9년 초과 전 | 0

| 수락됨

답변 있음
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...

9년 초과 전 | 0

| 수락됨

답변 있음
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...

9년 초과 전 | 5

답변 있음
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...

9년 초과 전 | 1

답변 있음
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.

9년 초과 전 | 0

| 수락됨

답변 있음
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 ')

9년 초과 전 | 1

| 수락됨

답변 있음
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); ...

9년 초과 전 | 1

| 수락됨

답변 있음
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...

9년 초과 전 | 0

더 보기