Answered
Converting dates from Excel Spreadsheet into MATLAB
What value do you get in excelDates after running that xlsread() command? You can plot the data directly and then use datetick('...

15 years ago | 0

| accepted

Answered
Help with For-Loop question?
When you use i=[pi/5:pi/5:2*pi], i is a vector with increment as pi/5, hardly any of the element is integer, you can not use i ...

15 years ago | 1

Answered
Importing data from an Excel file on a website
Of course you can not run cd(PATHNAME_KEY) because that url is not a directory. I wonder if you can run xlsread(fullfile(PAT...

15 years ago | 0

Answered
File paths of all function calls within an m script? (and all m scripts that call it?)
Will the code dependency report be helpful to you? In the M-editor, click Tools->Show dependency report

15 years ago | 0

Answered
Pause() function is screwing up control flow in my GUI
"At the beginning of each loop iteration, there's a pause(0.02) to reduce the GUI's CPU load." This doesn't make sense to me. If...

15 years ago | 0

Answered
matrix array
Okay, shuffle() is your own function. I can do that using randperm() like cyclist suggested. It's basically the same. %% a=...

15 years ago | 0

Answered
Process function at iterated linear indices
avg1 and avg2 are over-written every time inside the loop. outside of the for-loop, initialize avg1 and avg2 first: avg1...

15 years ago | 1

| accepted

Answered
Array of string cells and guide 'string'
I don't see a better way. A slightly different way is: error_msg=[]; error_msg=[error_msg;{'Error: something....'}]; se...

15 years ago | 0

| accepted

Answered
When running script from command line, how to close Matlab after?
Can you add quit or exit at the end of your myfile.m ? or matlab.exe -r myfile;quit

15 years ago | 1

| accepted

Answered
sorting sturctured variable
I don't think you can sort structure array directly. However, you can get the size of the field of each structure, then sort to ...

15 years ago | 1

| accepted

Answered
Boxplot with multiline x axis labels
After your plot, use findobj() to find the handles of the two labels and then change the position. h=findobj(gca,'type','te...

15 years ago | 0

| accepted

Answered
Browse Button in GUIDE issue
In your code, it says: set(handles.path_text,'String',[PathName FileName]) In the error message, it says: set(handles.p...

15 years ago | 0

| accepted

Answered
How to display the subsystem priority or tag name using M-Script
set_param(Block,'AttributesFormatString','%<Tag>')

15 years ago | 1

| accepted

Answered
How I can make GUI edittext box to hold matrix data?
Can you try uitable() instead? <http://www.mathworks.com/help/techdoc/ref/uitable.html>

15 years ago | 0

Answered
Round error using if statement. Two things don't equal each other
You are right about floating point rounding error. You can use eps %% x = sin(pi/6) y = cos(pi/6) mytan = x/y; ...

15 years ago | 0

| accepted

Answered
I have 4 different dimension matrices(A:1100X1, B:2200X1,C: 3300X1,D:3300X1)..I want to keep all 4 in one matrix..
I assume each of your data file contains the same variable Loglike, but the size is different from file to file, first is 1100x1...

15 years ago | 0

| accepted

Answered
How to introduce a array of text in matlab
Use the following a few examples: str1='this is my string' StrCell2={'a','bd';'eft','aldjfal'} s=input('please type i...

15 years ago | 1

| accepted

Answered
[Simulink/Matlab] How to access variable from M-file?
In that case, I don't see any reason why you can't run the following script, just an example: all_snr=rand(10,1); all_re...

15 years ago | 1

Answered
Intersection of large number of arrays
I think you'll have to do some kind of sort() or unique() operation. My thought is: combine all strings in one big cell array...

15 years ago | 1

Answered
How to get state values at a specified time?
In your model, click menu Simulation->Configuration Parameters... then in the left column, select Data Import/Export. On the ri...

15 years ago | 2

Answered
removing an variable from a list of strings
str={'a','b','c','d','e','f'}; str([1 3 5])=[] You might want to check out the function uigetfile(), uigetdir()

15 years ago | 0

Answered
What is rated capacity of battery?
The rated capacity is a parameter of the battery. Usually it is not to be calculated by your model. When you create the model fo...

15 years ago | 1

Answered
GUIDE and buttongroup
Yes, the 'SelectedObject' is a handle. You could do this: h=get(handles.BW_buttongroup,'SelectedObject'); get(h,'Tag')

15 years ago | 1

| accepted

Answered
Question about Recursively Adding Vectors to a Single Vector
For your reference: %% a=zeros(3,366); a(1,:)=0:24:(365*24); a(2,:)=7+a(1,:); a(3,:)=12+a(1,:); index=a(:)

15 years ago | 0

| accepted

Answered
cell2mat issue
The cells in your data meancell and detrendcell have different length of data, that is why they have to be in a cell array. You ...

15 years ago | 0

| accepted

Answered
string and isinteger
try this a=[1 1.1 -1 -1.2] TF=a==round(a)

15 years ago | 1

| accepted

Answered
Writing and reading xml through m script .
doc xmlwrite

15 years ago | 0

Answered
Displaying surface in XY plane
view(2)

15 years ago | 1

| accepted

Answered
The controlling and modelling of quadrotors and simulating it on simulink ?
MATLAB/Simulink is the De facto software tool for control design. It's very easy to use and straightforward for control design e...

15 years ago | 0

Answered
draw a line on an image
Pay attention of the syntax of line(). line([x1,x2],[y1,y2]), not line([x1,y1],[x2,y2]); figure(1);line([0 1],[0 1]); will...

15 years ago | 7

| accepted

Load more