Answered
change the resolution of time series from hourly to 30min
resample() would be the function to use, but in your case, just process your original data to create a new timeseries. %% D...

15 years ago | 0

| accepted

Answered
what I can make the average of the next nc files?
The function is mean().

15 years ago | 0

| accepted

Answered
How to find out %COMPUTERNAME% and %USERNAME% ??
or getenv('username') getenv('computername')

15 years ago | 5

Answered
Simulink Mux parameters
It is not particularly related to the Mux block. You are looking for a way to get the dynamic signal data from a Simulink block ...

15 years ago | 0

| accepted

Answered
Random Number Generator
help randint help rand round(100*rand(5,1)) enter at <http://www.mathworks.com/matlabcentral/answers/9073-what-is-your-...

15 years ago | 0

Answered
find peaks
If you have noise in the data, you need to filter it first. See: doc filter

15 years ago | 1

Answered
load a data
importdata() automatically does that. What is your purpose? To learn if-else statement? To check the file extension, use filepa...

15 years ago | 0

Answered
Create function to calculate leap year
TF=~(datenum(year,2,29)==datenum(year,3,1)) Using your approach, it should be like below. This is primarily for learning the ...

15 years ago | 2

Answered
How to write a cell array of numbers and string to file
xlswrite('test.xls',{'abc',1;2,'adsjk'});

15 years ago | 0

| accepted

Answered
How to count length of array?
wordsarray is a cell array so the length is 1. try length(wordsarray{1})

15 years ago | 0

| accepted

Answered
Subscript assignment mismatch with the use of 'find'
floating point comparison!!!

15 years ago | 0

Answered
How do I erase something I printed in the command window (to print something else instead)?
You could use waitbar(). It's much nicer. If you really want to erase what you've already printed, use fprintf('\b') ...

15 years ago | 0

| accepted

Answered
xlssheet reading in FIS editor
Use xlsread() or uiimport() to get the data from xls sheet into MATLAB base workspace. Then you can use it in Simulink.

15 years ago | 0

Answered
Where do people learn "bad" programming habits (i.e., goto, global, and eval)
One suggestion is to survey them first to see what is their programming background. I think some aspects of MATLAB programming a...

15 years ago | 2

Answered
array that grows in size over time
You don't need to declare it. MATLAB will automatically grow it. Although many will advise you not to do that because it slows t...

15 years ago | 0

Answered
Reading Excel files on a Mac
Hah, found this! Hope that is the cause of the problem. [NUMERIC,TXT,RAW]=XLSREAD(FILE,SHEET,RANGE,'basic') reads an XLS file a...

15 years ago | 0

Answered
Scaling with Imp2SS function
I think you need to use impulse(sys,Ti:Ts:Tf) where Ts is 0.05 for you to make it match. *Update* This is an interesting quest...

15 years ago | 0

Answered
Where are the tabs for different files in the editor in 2011a?
Open editor, go to menu Desktop->Document Bar->Bar Position. It might be hidden.

15 years ago | 1

Answered
How to watch from matlab what I'm watching on my monitor ?
I want MATLAB to do everything too but I don't think MATLAB provides screen recording capability yet. Doug Hull did a lot of vid...

15 years ago | 0

Answered
Incompatibility between matlab 7 and matlab 9 files..!!
In R2009a, open your Simulink model, click File->Save As... then in the drop-down list for "Save as type", choose the right MATL...

15 years ago | 0

| accepted

Answered
How do I create an array of scalars?
That is because regionprops() returns a structure. Type Major_I.MajorAxisLength and Minor_I.MinorAxisLength in Command Window sh...

15 years ago | 0

| accepted

Answered
Line Rendering Problem
I think it's expected. If you change your plot command (both) to be plot(x1,y1,'rs'), you will see the effect. (x1,y1) is not ev...

15 years ago | 0

Answered
Determining What Calls a Function
depfun() is used to locate the dependent function from top to down. Not sure if you can utilize it.

15 years ago | 0

Answered
Loading delimited text file
use importdata(). Ignore the empty lines between data lines. Also ignore your dash lines. >> a=importdata('test.txt') ...

15 years ago | 0

Answered
How to delete headers from different row positions other than at the top - MATLAB
%% fid=fopen('test.txt','rt'); a=textscan(fid,['%s%s',repmat('%f',1,11)],'delimiter',',','commentstyle','Date,time,'); ...

15 years ago | 1

| accepted

Answered
round (returning a number)
What do you mean round in this case? If a=1.50123 and you want a=1.5, that is rounding. If a=1.50000, and you want a=1.5, that's...

15 years ago | 0

| accepted

Answered
Share data between functions in main
Well, since you are not using GUI, I think it's easier. You can define the output argument of your function gui_passdata() and p...

15 years ago | 0

Answered
Error: Subscripted assignment dimension mismatch
Can you try [I,J,V]=find(dummy). It gives position index and value at once.

15 years ago | 0

| accepted

Answered
GUI - Updating a figure pseudo real-time and stopping on mouse-click
Instead of a mouse click (it might accidentally happen), you might want to consider adding a push button (or toggle button) on y...

15 years ago | 0

Answered
How to write several results in the same sheet of a Xls file ?
If it's easy to combine all the data into one, then I recommend combining them first and then write. data1=rand(4,4); da...

15 years ago | 0

Load more