I used two methods to plot wind direction and speed data: Sigmaplot and Matlab.
To correctly show the wind is blowing from the degree, say 10 degree, I need to check the 'clock wise' option. Otherwise the direction will be wrong.
When I used the wind_rose.m, which is downloaded from this link:
http://www.mathworks.com/matlabcentral/fileexchange/17748-windrose
the correct way is to use D-180, and set the 'dtype' to 'meteo'.
This way the two plots made by two different methods will be consistent and correct.
MATLAB applications, tutorials, examples, tricks, resources,...and a little bit of everything I learned ...
Showing posts with label matlab. Show all posts
Showing posts with label matlab. Show all posts
Thursday, September 19, 2013
Thursday, February 28, 2013
Matlab: Remove a cell element from a cell array
Similar to the method to remove unwanted element in a matrix, which is discussed in details in another post (http://matlabnewbie.blogspot.com/2009/07/matlab-remove-all-unwatned-elements-in.html), the unwanted cell element can be removed from a cell array. The only difference is that the strcmp function should be used to identify where all those unwanted cells are.
The following example shows how to remove the cell 'good' from the cell array a, to be somehow humble.
a=[{'this'},{'is'},{'a'},{'good'},{'matlab'},{'blog'}]; % create a cell array
a=a(~strcmp(a, 'good')) % remove the 'good' cell
Result looks like this:
a =
'this' 'is' 'a' 'matlab' 'blog'
The following example shows how to remove the cell 'good' from the cell array a, to be somehow humble.
a=[{'this'},{'is'},{'a'},{'good'},{'matlab'},{'blog'}]; % create a cell array
a=a(~strcmp(a, 'good')) % remove the 'good' cell
Result looks like this:
a =
'this' 'is' 'a' 'matlab' 'blog'
Wednesday, February 27, 2013
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.
Thursday, August 12, 2010
Download Matlab toolbox manual - Fuzzy logic toolbox
I would like to share a good book to show you how to use Fuzzy Logic Toolbox in Matlab. You can download it from:
http://www.box.net/shared/xe94kj9ej1
Enjoy!
http://www.box.net/shared/xe94kj9ej1
Enjoy!
Subscribe to:
Posts (Atom)
my-alpine and docker-compose.yml
``` version: '1' services: man: build: . image: my-alpine:latest ``` Dockerfile: ``` FROM alpine:latest ENV PYTH...
-
It took me a while to figure out how to insert a space in Mathtype equations. This is especially useful when you write an equation with mult...
-
In this post, I am trying to solve the problem given in the comments of one of the old post. Here's the problem, if I understand it co...
-
Recently I got a very long column of data and it contains lots of NaN. I found the finite function very useful to help me remove all the NaN...