Showing posts with label matlab. Show all posts
Showing posts with label matlab. Show all posts

Tuesday, March 24, 2015

windrose plot by sigmaplot and matlab

I used two strategies to plot wind course and velocity knowledge: Sigmaplot and Matlab.
To appropriately present the wind is blowing from the diploma, say 10 diploma, I have to verify the 'clock sensible' choice. In any other case the path can be mistaken.
Once I used the wind_rose.m, which is downloaded from this hyperlink:
http://www.mathworks.com/matlabcentral/fileexchange/17748-windrose
the right method is to make use of D-one hundred eighty, and set the 'dtype' to 'meteo'.

This manner the 2 plots made by two totally different strategies can be constant and proper.

Matlab: Remove a cell element from a cell array

Just like the tactic to take away undesirable component in a matrix, which is mentioned in particulars in one other publish (http://matlabnewbie.blogspot.com/2009/07/matlab-take away-all-unwatned-parts-in.html), the undesirable cell factor could be faraway from a cell array. The one distinction is that the strcmp perform ought to be used to determine the place all these undesirable cells are.

The next instance exhibits learn how to take away the cell 'good' from the cell array a, to be by some means humble.

a=['this','is','a','good','matlab','blog'];                 % create a cell array
a=a(~strcmp(a, 'good'))                                                          % take away the 'good' cell

End result seems to be like this:


a = 

    'this'    'is'    'a'    'matlab'    'weblog'

Set the properties of a dataset array in Matlab

The % signal, %, can be utilized within the matlab code so as to add explanatory info to the code. Equally, we will add explanatory info to a dataset array, through the use of the dataset array properties. The set perform can be utilized to assign values to the dataset property, and the get perform can be utilized to entry these info.

DS=dataset(...) % a dataset array is constructed
DS=set(DS, 'Description', 'No matter can describe the dataset might be put right here');
get(DS) % present dataset array properties
abstract(DS) % additionally present dataset array properties 

The 'Description' could be changed with different properties that are displayed by the get perform. 

Set the properties of a dataset array in Matlab

The percent sign, %, can be used in the matlab code to add explanatory information to the code. Similarly, we can add explanatory information to a dataset array, by using the dataset array properties. The set function can be used to assign values to the dataset property, and the get function can be used to access these information.

DS=dataset(...) % a dataset array is constructed
DS=set(DS, 'Description', 'Whatever can describe the dataset can be put here');
get(DS) % show dataset array properties
summary(DS) % also show dataset array properties 

The 'Description' can be replaced with other properties which are displayed by the get function.