Frage


gathering data corresponding to a string of dates
I have a vector of temperatures and a cell array of Date/Time. I want to create 4 variables where each variable represents diffe...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


fprintf filename error
Im using fprintf to write some data onto text files and using the following code to define the text file: for i= 1...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


running R within matlab
I was wondering if it is possible to work between matlab and R to plot some data. I have a script in matlab which generates a te...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


using ismember to find the corresponding value
clear all depth = [0,2,4,7,10,13,16,19,22,25,30,35];%depth below surface temp = 0 + 29.*rand(365,12); metaT = 0 + 35....

mehr als 14 Jahre vor | 1 Antwort | 1

1

Antwort

Frage


legend in 2d line plot
I'm plotting data in a for loop where I'm looping through two datasets so using plot...; hold on;plot... I only want the lege...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


taking monthly correlation values
The following example code can be used to calculate the correlation between a data set: clear all FieldName = {'loc1',...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


function name
Why is it that a function does not work with some names? e.g. I named one of my functions magnuson(PathName) and the function wo...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


request user input for a number of inputs
At the start of one of my scripts I would like to use the input command for the user to specify some values for a given location...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


ranking a cell array
Take the following example: clear all Name1 = {'Data1','Data2','Data3','Data4'}; Data = {6.2,6,3.2,8}; CombnsName ...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


text to annotate figure
Is it possible to annotate a plot with text without having to specify the x and y coordinates. I know you can use commands like ...

mehr als 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


nicer outcome from fprintf
I'm looking for a better way of saving data into a text file. I'm currently using fprintf, but when the data is saved as a text ...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


if statement after use input
Is there a possibility of performing an if statement following an user input. For exampl: Variable = input('type 1,2, or 3 ...

mehr als 14 Jahre vor | 2 Antworten | 1

2

Antworten

Frage


loop through structures and find the correlation
The following example resembles a similar problem that I'm dealing with, although the code below is merely an example, it is str...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


plotting in a loop - new figure window
The following example produces a subplot of the 3 variables below (located in a structure): clear all Data.S1 =...

mehr als 14 Jahre vor | 3 Antworten | 0

3

Antworten

Frage


using textscan
Is textscan the correct command to use when importing data from text files into matlab. The command seems to work fine if I only...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


naming a structure
clear all FName = {'Data1','Data2','Data3'}; data1 = [rand(32,1),rand(32,1),rand(32,1)]; NewName = {'Location1'}; ...

mehr als 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


converting a cell array into a structured array
I've imported some .txt files into matlab using the textscan command, where I now have a variable 'C' which is an 8x4 cell, each...

mehr als 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


error when writing a function
When using a function that I have written, matlab returns the error: Undefined function or variable 'Bathymetry' E...

mehr als 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


error when using fprintf
can anyone tell me where I'm going wrong here. clear all data = rand(365,1); filename = fullfile('file','test.txt');...

mehr als 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


variables form strucutre
I have the following example which expresses the type of problem that I'm trying to solve: clear all textdata = {'Date...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


making a function work
I've written the following function which imports .txt files into matlab. The .txt files can either be recorded at hourly interv...

mehr als 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


averages of cell array
I have the following script for importing text files into matlab which include hourly data, where I am then trying to convert th...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


alter a matrix
I have a matrix ('data') which is composed of day of year in the first column and temperature data in the second column and also...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


excel dates
really annoying problem with importing dates from excel into matlab. The dates in excel are in the format mm/dd/yyyy but when I ...

mehr als 14 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


linear fit
When plotting a scatter plot is it possible to add a linear fit to the the graph without having to go into tools-> basic fitting...

mehr als 14 Jahre vor | 6 Antworten | 1

6

Antworten

Frage


tab delimited text file from matlab
clear all a = rand(131400,12); DateTime=datestr(datenum('2011-01-01 00:01','yyyy-mm-dd HH:MM'):4/(60*24):... ...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


integration with matlab
How would I solve the following equation for ZV: ZV = integral_{0}^{ZD}(z.*A)dz where ZD = 40; z = [1:2:12];%depth A =...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


corrcoef maths
Does anyone have a link to the mathematical background for the corrcoef function in matlab? I want to try and understand how the...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


linspace
I want to create a vector which runs from 1 to 260 with increments of 360 between every whole number. I can do this manually ...

mehr als 14 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


vectorization
Can someone give me a push in the right direction regarding vectorising a loop. Is it possible to vectorise any loop? If so, I...

mehr als 14 Jahre vor | 1 Antwort | 0

1

Antwort

Mehr laden