Answered
why ascii instead of letter?
Original x is a double array, but in your for-loop, you assign a char value to its element. So it takes the ASCII value of lette...

15 years ago | 0

Answered
need repmat help
It's not about repmat. I think you can do this: x=sum(th_diff3_1,4); x=sum(x,3); percent3_1=(x/1390) * 100

15 years ago | 0

| accepted

Answered
Matrix with alternating signs in each row vector
Some improvement. m=5;n=4; M=ones(m,n); M(2:2:end,:)=-1 Or alternative: %% m=9;n=8; a=(2*mod((1:m)',2)-1)*(1:n)

15 years ago | 1

| accepted

Answered
sprintf + calling value in nested structure
You can not use getfield() to get to the field more then one level below. For example: clear a; a.item_1.b.c.item_1.d...

15 years ago | 0

| accepted

Answered
Generating signal with variable frequency
The comment in my answer to this question has a method to generate a sine wave with variable frequency. <http://www.mathwork...

15 years ago | 0

Answered
How do i put content in a text box into a list in GUI?
You need to use namelist{1,2} = get(hObject, 'String') Notice the curly bracket {}, instead of parentheses ()

15 years ago | 0

Answered
Engine Modeling
Type demo in MATLAB Command Window, then at the left column, select Simulink->Automotive Applications. There are some simplified...

15 years ago | 0

Answered
dir search multiple files
Files=[dir('*.jpg');dir('*.png')]

15 years ago | 7

Answered
Regarding reading diffrent files
Files=dir('*.nc'); for k=1:length(Files) FileName=Files(k).name; %load file end

15 years ago | 0

Answered
Reading a plot
In your figure, click menu Tools->Data Cursor, and then click any point on the curve.

15 years ago | 1

| accepted

Answered
Remove Vertical Line at the start of the Line Plot
To show the x axis starting at a particular point, use xlim() or axis()

15 years ago | 1

| accepted

Answered
Is deleting threads helpful in this forum?
I agree! OP can always edit the question. I would encourage everyone to edit it as the question become clear. Right now, there a...

15 years ago | 2

Answered
How to directly load data to workspace from main function
When you run load() in Command Window or through a script, the data is loaded into the 'base' workspace. When you run load() ins...

15 years ago | 0

Answered
Controlling X variable when using Fmincon
After the iteration, just use x_old=x; Do you know that you can assign a matrix to another matrix, as long as they are in the...

15 years ago | 0

Answered
Plot Stock Chart and Overlay Remaining time series from Excel Worksheet
Make your program flow like this: f=figure;hold on; candle(....) Then run the previous code with the 'figure(1);hold ...

15 years ago | 0

| accepted

Answered
is it possible to make command window scroll bar being in position of it self even by runnig a m-file and not going end of wondow?
I am not aware a method to control the Command Window scroll bar position through M programming. You could press ctrl-home to qu...

15 years ago | 1

Answered
How to create a bootable usb instead of a bootable disk in xpc target explr (R2007b)?
See "Booting Target Computers from Removable Boot Drives" at <http://www.mathworks.com/help/toolbox/xpc/gs/bri6vp0.html>

15 years ago | 0

Answered
Where to save a downloaded block in R2007b?
You can extract the zip file to any folder you like. The file extension is likely to be .mdl if it is for Simulink. Then you ...

15 years ago | 0

| accepted

Answered
plotting in same figure window
>> help figure FIGURE Create figure window. FIGURE, by itself, creates a new figure window, and returns its handle. ...

15 years ago | 1

| accepted

Answered
Index of element to remove exceeds matrix dimensions.ERROR
Run the code below you will see the exact error message. It's because variable Nodes and NewNodes didn't even exist before you w...

15 years ago | 0

Answered
Export to PDF that uses entire page
You might be able to do it using print doc printopt doc print

15 years ago | 0

Answered
Interpolation of an hypersurface
The Curve Fitting Toolbox might help. <http://www.mathworks.com/products/curvefitting/?s_cid=global_nav>

15 years ago | 0

Answered
random t distribution sample
help tpdf <http://www.mathworks.com/help/toolbox/stats/brn2ivz-141.html>

15 years ago | 0

Answered
HOW TO SORT INTO GROUPS
%% a=[1 9 2 4 3 5 4 6 5 1 6 9 7 0 8 3 9 1 ...

15 years ago | 0

Answered
add my photo to gui
My experience was that there was no GUI element for you to put a static image directly. Not sure if the new version of GUIDE pro...

15 years ago | 0

Answered
sprintf of a variable and string name
In that case, the name is actually given manually. To avoid entering the same name twice, maybe you can do this. Name='t56757...

15 years ago | 1

| accepted

Answered
How to plot a function, typed in a textfield (GUI), as a function handle?
I am not sure if anonymous function can be defined that way. Try this: %% str='x.^2'; f=inline(str); x=0:0.1:4; ...

15 years ago | 0

| accepted

Answered
display numbers in 'format long'
sprintf('%30.10f',pi*1e5) doc sprintf for more details.

15 years ago | 1

| accepted

Answered
finding how many folders are in an other folder and how many files (.xls files) are in each folder
FolderA='C:\mydocument\c'; f=dir(FolderA) will give you a list of files and folders. Checking f.isdir will tell you how ...

15 years ago | 1

| accepted

Answered
Matrix Multiplication
use size() function to get the size of your matrix. You'll find out the size of your two matrices are slightly different.

15 years ago | 0

Load more