Answered
how to put a limited value for an input ?
test=0 while test==0 a=input('enter 0<a<100') if a>0 & a<100 test=1 end end

13 years ago | 0

| accepted

Answered
To read a cell array
Example A=num2cell(magic(5)) Col=3 A(:,col)

13 years ago | 0

Answered
Creating a Nested Function
Change the name of your nested function, because you are using x as function name and variable function root = new_name(x) ...

13 years ago | 0

Answered
Vector Combination - Matlab Noob
out=R2 idx=R~=0 out(idx)=R(idx)

13 years ago | 0

| accepted

Answered
How to convert the format of a date?
datestr(yourdate,'dd:mm:yyyy') To remove duplicate date, You can use unique(datestr(yourdate,'dd:mm:yyyy'),'rows')

13 years ago | 0

| accepted

Answered
How do I sort rows and get the average (mean) at the same time?
A=rand(5000,5) A1=zeros(500,5) % Pre-allocate A2=A1; ii=0; for k=1:10:5000 ii=ii+1 A1(ii,:)=mean(A(k:k+4,:)); ...

13 years ago | 0

Answered
Why deplyoed executable file doesn't read *.MAT file ?
When you load tour mat file, did you use load('yourmatfile') % This recognize the current folder in Matlab but not in you...

13 years ago | 1

| accepted

Answered
excel decimal time conversion
datestr(0.3692,'HH:MM:SS')

13 years ago | 0

Answered
Labelling a Double Axis Graph
Try xlabel(ax1, 'G');

13 years ago | 0

| accepted

Answered
Getting an if statement to accept a word.
disp('Enter your information to find your ideal training heart rate.') age= input('Enter your age:'); rhr= input('What is yo...

13 years ago | 0

Answered
Compile a simple function
when you compile only the function, how are you going to call this function? I think you should create a script with, for exampl...

13 years ago | 1

| accepted

Answered
Special characters in regexp
You can precede ^ with \ Example str='abcd^ef'; new_str=regexprep(s,'\^','')

13 years ago | 0

| accepted

Answered
ho to Send data from uitable to workspace?
You can use assignin Read your data from your table then send it to workspace data=get(gandles.uitable1,'Data') assigni...

13 years ago | 0

| accepted

Answered
Setting of PI Parameters
Use <http://www.mathworks.com/help/slcontrol/automatic-pid-tuning.html PID Controller Tuning>

13 years ago | 0

Answered
How can I fix this "The "FixedStepDiscrete" solver cannot be used to simulate block diagram,because it contains continuous states"
If your model contains continuous state, you can't use a discrete solver, but you can choose other solver with fixed step.

13 years ago | 1

Answered
Cell Array and Matrix Manipulation Help - Matlab Noob
out=cellfun(@(x,y) x*y,Kd2,U_forcesd,'un',0)

13 years ago | 0

| accepted

Answered
Matrix to Vector every two rows
a=reshape(test2',2,2,[]) out=cell2mat(arrayfun(@(x) reshape(a(:,:,x)',[],1),1:size(a,3),'un',0)) out=out(:)

13 years ago | 0

| accepted

Answered
how to rearrange an array? rows to columns?
aa=a'

13 years ago | 0

| accepted

Answered
How do you open a .xlsx file in excel from matlab.
winopen('yourfile.xls')

13 years ago | 20

| accepted

Answered
How to change units of Y axis?
*Edit* yt=(0:0.4:1.2)*10^4 set(gca,'yticklabel',xt)

13 years ago | 1

| accepted

Answered
How to sort orders of rows?
Example A=rand(20,6); idx=reshape(1:size(A,1),5,[]); m=size(idx,2); idx1=idx(:,1:2:end); idx2=idx(:,2:2:end); A1=A(idx...

13 years ago | 0

| accepted

Answered
Limiting values when plotting 'bar3'
set(gca,'xtick',[],'ytick',[])

13 years ago | 1

Answered
Is is possible to reduce block diagrams in control system using matlab simulink?
You can use connect function to create your model help connect

13 years ago | 1

Answered
Question regarding fft output
Your data are not correct, If your frequency f0=2 then the period T should be T=1/f0 N=20; T=2; f0=1/T; ts=T/N t=linsp...

13 years ago | 0

Answered
How to make elements in an array permanant
You can save your array in a mat file

13 years ago | 1

| accepted

Answered
Selecting a curve trough an axes
h=gco x=get(h,'Xdata'); y=get(h,'Ydata')

13 years ago | 0

Answered
trouble importing excel files
Try xlsread function [a,b,c]=xlsread('yourfolder/yourfile.xls')

13 years ago | 0

Answered
Splitting a Vector Into Groups
v=min(A):61:max(A); for k=1:numel(v) [~,idx]=min(abs(A-v(k))); out(k)=A(idx) end

13 years ago | 0

| accepted

Load more