Answered
Converting GPS time to Local Time
t2=datestr(seconds(t)+hours(12),'HH:MM')

7 years ago | 0

| accepted

Answered
Adding legend for iteration and if condition graph
Try this, title('Graph of behaviour against iteration'); xlabel('iteration t'); ylabel('beha...

7 years ago | 0

Answered
Details on surf plot
As an alternative to waterfall, I just learned that you can change the meshstyle of surfaces h=surf(peaks) h.MeshStyle='...

7 years ago | 1

| accepted

Answered
The sum of the loop elements
First of all you need to store the values of fi_z_i in every iteration, so that you end up with a vector consisting of all latit...

7 years ago | 1

| accepted

Answered
how to fill in zeros in index not used?
Not sure I understand the question, but... B=zeros(1,3); %Case 1 B(2)=5 %Case 2 B(1)=5

7 years ago | 0

Answered
Map axis description (degrees).
It is easier than you think, try this landareas=shaperead('landareas.shp','UseGeoCoords',true); axesm ('mercator','Frame...

7 years ago | 1

| accepted

Answered
I need to plot around 60 graphs, i wrote the following code but the graphs are too small to see them easily, how could I plot them bigger than now?
Plotting 60 graphs in a single window will make each axes small. Your options are to increase the size of the figure set(gc...

7 years ago | 0

Answered
Plot in log-log
I'm fairly sure that is in fact a loglog-scale. Try: axis([0.1 100 0.1 100]) and see for yourself. The y-range is too na...

7 years ago | 0

| accepted

Answered
hi every body.my question is how can i plot subplot like this picture in Matlab. i want draw dotted line cross the subplots like red dotted line and write on it like blue circle.
(1) learn how to use subplots MATLAB has a function |subplots()| which is really easy to use. Personally I prefer the functio...

7 years ago | 1

| accepted

Answered
Change the name of a figure in a Correlation plot
Just set the name of your figure by set(gcf,'Name','string')

7 years ago | 0

| accepted

Answered
How could i search a text for varying patterns
Not sure if it's the best way, but the code starts at str(5) and ends at the dash, so this should work [~,s] = regexp(str, ...

7 years ago | 1

Answered
How can I find a minimum only before a peak has been detected?
What you are looking for seems to be the beginning of the peak, which is not necessarily a valley. A simple method to approximat...

7 years ago | 0

| accepted

Answered
Import excel sheet, multiply each column with a variable, and save the results as a new cell array
The following solution is inefficient but works for R2016b and later. See Guillaume's answer for better solutions, also includin...

7 years ago | 0

| accepted

Answered
Opening different files in for loop with dlmread?
You need to call one file at a time in dlmread. Change to: for k = 1:3 N = string([1,2,3]); caesarN = strcat(...

7 years ago | 0

| accepted

Answered
find rows with all but one nonzero element
Here's one way: A(sum(A,2)==1,:)

7 years ago | 0

| accepted

Answered
Detect beginning and end of inhalation in respiration signal
Based on the data provided in the comments, here's one way to use |findchangepts| to locate continuous steep slopes. As previous...

7 years ago | 1

| accepted

Answered
How do i remove all blank lines from excel sheet in matlab?
One fix would be to remove the empty lines, which is quite simple. However, a better fix would be to not introduce this issue to...

7 years ago | 0

Answered
How do I turn on (make visible) Major Tick Labels on a logarithmic Colorbar?
So, finally finished installing latest release. Try setting the ticks manually and it should work. For the example given in the ...

7 years ago | 0

| accepted

Answered
how to display correlation coefficient on graph?
The code you attached works perfectly fine, just replace the variable names and add after your own code tmp=corrcoef(da...

7 years ago | 0

| accepted

Answered
How to plot a hatched data set over a contour plot?
If you want to hatch an area based on your data, then try something like this: figure;hold on [x,y]=meshgrid(1:49,1:4...

7 years ago | 0

Answered
How to extract information from the filename?
If you know something about the structure, then this is quite simple. Let's say the structure is [year.day.hour.min], with some ...

7 years ago | 1

Answered
How to do this kind of contour plot?
Basically you don't define data along |lines| but rather on a full rectangular grid. Let's say you want to plot data between x=0...

7 years ago | 0

| accepted

Answered
Is there a simple approach to adding spaces before and after every number in a cell array, where each cell is a combination of numbers and letters?
I'll just go ahead and give an alternative answer because I spent way too much time trying to solve this seemingly easy problem...

7 years ago | 0

Answered
trying to model points inside a sphere
This will generate a sphere with random points inside of it (code adapted from the original question): if true clear ...

7 years ago | 0

Answered
How filter data by specified criterion
A is your 6x6 cell array, then: [rows,~]=find(ismember(A, 'Interupt')) A(rows,:)=[]; should do the trick

7 years ago | 1

| accepted

Answered
Vector comparison by value produces strange results
try to type format long and compare again

7 years ago | 0

| accepted

Answered
how to create a Image using matrix
http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F

7 years ago | 0

| accepted

Answered
3D plot on given X,Y coordinates
There are a number of issues with your code, such as wrong type of input for meshgrid and surf. Assuming that you have three...

7 years ago | 0

Answered
Make rows of square bracket data
A=str2num(A) reshape(A,[6 4])'

7 years ago | 2

| accepted

Answered
Plot with two different x-axix
Try this. clear all;close all figure; h=plot(k1,Depth1) ax1=gca ax1.XColor = 'r'; ax1.YColor = 'r'; ...

7 years ago | 1

| accepted

Load more