Community Profile

Contact

Top 1% contributor

Maybe use assignin --> <http://www.mathworks.co.uk/help/matlab/ref/assignin.html>

accepted

1

Answered 2 years ago

Could someone please explain to me how the accumarray function works. For example: val = 101:105; subs = [1; 2; 4; 2; 4]...

2 Answers

2

Asked 3 years ago

The main problem you have here is that you have not stored each of the text file names. The code shown below should solve thi...

Answered 3 years ago

using ChangesN = find(diff(S)) would demonstrate where the value was changing and then to see how many time this happen...

Yes, You need to save the file in your matlab directory. So, save the file in a folder somewhere such as my documents\matlab\fil...

I have 2 variables: d1 = 1:5; d2 = 6:10; I would like to calculate 'dat', which is given by: dat = d1./(10.*d2);...

3 Answers

0

Asked 2 years ago

If I have a matrix: data = rand(365,5); What is the most appropriate way of calculating the correlation between each col...

What is the best way of improving my matlab skills? I have been using matlab for some months now and have learnt a lot in that t...

I'm aiming to import data from various folder and text files into matlab. clear all main_folder = 'E:\data'; %D...

From the following example how would I show the time denoted by 'out' along the xaxis: clear all time = (0:23)'; n = ...

The following example produces a subplot of the 3 variables below (located in a structure): clear all Data.S1 =...

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...

I dont know if this will help but I use ^{o} so for temperature in degrees C I type xlabel('Temperature ^{o}C');

I have an equation which has 3 unknown variables V, s, and T. I want to produce a contour plot that shows what happens when each...

Consider the following: A = [1,1,1; 2,3,1; nan,3,1; nan,3,nan]; how would I replace the missing val...

This is a simplistic example of a problem I am facing: depth = [0:1:20]'; data = rand(1,length(depth))'; d = [dep...

I have a time series of measurements as follows: time = [733774,733774,733775,733775,733775,733776,733776]; data = [1,1....

I have the following code for producing a plot of data that extends two years in terms of day of year: time = datenum('2008...

I'm generating a plot with 2 yaxis showing two datasets with larger differences in their values, e.g. data1 = 100 + (200-10...

Is there a method for changing the colorscale of your figure to grayscale without using the colormap('gray') option. I have an i...

In the following figure: data = rand(1,365); subplot(121); plot(1:365,data); xlabel('label'); ylabel('label'); ...

I have a dataset in the following format: dd = datenum('2009-04-17 02:00'); ddend = datenum('2009-11-24 12:27');...

From the following example: [C,h] = contourf(peaks(20),10); colormap autumn How would I include the yaxis on the left...

This is a very basic question but how would I add the elements of a vector like so...: x = [1,2,3,4,5,6]; ans = 3 6 10 15 ...

I would like to find in which column a desired number is first located. From the example below: x = [0,1,3,2,5,22,24,1,2,...

I need some advice regarding the spectral coherence of several signals. Consider the following example: t = 1:365; A =...

I have a code below that highlights a defined region in a plot: x = 1:24; a = 1; b = 50; y = a + (b-1).*rand(lengt...

I am attempting to analyse a time series with spectral analysis and am working through the example shown in: <http://www.math...

In order to list folder contents I use: TopFolder = dir('E:\'); Say if I had one file within that specific folder MATLAB...

Consider the following example: clear all data = {rand(1,5),rand(1,4),rand(1,4),rand(1,6)}; data1 = cellfun(@(x) cell...

Load more