Beantwortet
Fail to plot graphs in a for loop, hold on doesn't work
Put the "hold on" command after the figure() line. "hold" holds the current plot. "figure(H)" makes H the current figure. ...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
What command could run any file.m chosen
help run FileName='c:\mydoc\test.m'; run(FileName);

fast 10 Jahre vor | 0

Beantwortet
How can I change the configuration parameters by command line?
On the configuration parameter dialog window, hover over "Type" under "Solver options", right click, select "What's this?", it w...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
PostLoadFcn attempts to run before block diagram is fully loaded
From the error message, "Name changes are allowed only after the block diagram is loaded fully", it sounds like the name changin...

fast 10 Jahre vor | 0

Beantwortet
count number values exceeds given threshold in moving window
M=100; N=4; A=randi(35,1,M); B=A>20; C=ones(N,M-N); C(1,:)=1:(M-N); C=cumsum(C); D=sum(B(C));

fast 10 Jahre vor | 0

Beantwortet
How to call specific numbers from a matrix?
a=rand(100,3) A=sum(a(:,1)>0.5) B=sum(a(:,2)>0.3 & a(:,3)>0.2)

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Writing contents cell into a txt file
c={'dog','cat','fox'}; fid=fopen('out.txt','w+t'); for k=1:10 fprintf(fid,'%s ',c{:}); end fclose(fid);

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Checking inequality condition for each component of a vector.
To explain the result you saw, your command is equal to : temp=-0.1 < vec; temp < 0.1

fast 10 Jahre vor | 0

Beantwortet
I have a file saved in matlab workspace. I want to find out the FFT of that stored data? How can i do that
There is a MATLAB function called fft(). help fft

fast 10 Jahre vor | 0

Beantwortet
how to set 'Fixed-step size' specified in the Configuration Parameters dialog for block diagram in a simulink model from a GUI
You need to set a value for the variable 'Ts' in the base workspace. assignin('base','Ts',0.01)

fast 10 Jahre vor | 1

Beantwortet
How can I put index number of matrix itself?
Use cell array, maybe? n=5; A=cell(n,1); A{1}=1; A{2}=rand(2); A{3}=magic(3); ...

fast 10 Jahre vor | 0

Beantwortet
Diary file with current date and time as time stamp
dfile=[datestr(now,'mm-dd-yyyy'),'-1529.txt']; diary(dfile);

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to string 1 and 0 into array
'1101111000111101'-48 sprintf('%d',[1 1 0 1 1 1 1 0 0 0 1 1 1 1 0 1])

fast 10 Jahre vor | 1

Beantwortet
To Workplace delays data write out when simulation is paused
try set_param('Model','SimulationCommand','WriteDataLogs') or set_param('Model','SimulationCommand','Update') to force it. I...

etwa 10 Jahre vor | 0

Beantwortet
How to Find First Min Value And Index it??
[row col]=find(q==minq,1,'first') or q=[5 8 1 4 1 2 2 3 1] [minq,Loc]=min(q(:)); [row col]=ind2sub...

etwa 10 Jahre vor | 0

Beantwortet
How to save logged signal to a MAT file without using 'TO WORKSPACE' block ?
If it is done through customized GUI, it might depend on the customized GUI. If it is done through right click the signal li...

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
Comapre matrix and function a operation
Here is one solution. You might need to clarify some special cases. What the output should be if B contains value 25 or 20? ...

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
Pre allocating all fields in a structure?
mystructure=cell2struct({1,'xyz'},{'a','b'},2)

etwa 10 Jahre vor | 0

Beantwortet
How do I create an array containing the system layout of a Simulink model?
Hierarchy=find_system('ModelName','LookUndermasks','All','FollowLinks','on','BLockType','SubSystem')

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to fix: Attempt to execute SCRIPT fprintf as a function:
fprintf() is a built-in function. \toolbox\matlab\iofun\fprintf.m is a help text file. Why do you have your own C:\Users\Holl...

etwa 10 Jahre vor | 1

Beantwortet
How to create. xml file using stored data in matlab variables ?
help xmlwrite and see the example

etwa 10 Jahre vor | 0

Beantwortet
Is there a way to turn off or suppress bold headers on tables in the Command Window?
It might not be possible according to the document. http://www.mathworks.com/help/matlab/ref/diary.html?searchHighlight=diary...

etwa 10 Jahre vor | 0

Beantwortet
How to set visibility of Button in SIMULINK Mask ?
Select your masked block, type "get(gcbh)" in Command window to see a full list of parameters and their values. get/set eithe...

etwa 10 Jahre vor | 0

Beantwortet
How to programmatically change the name of a S-function
I tried and it seemed working. set_param(BlockPath,'FunctionName','NewS_Function');

etwa 10 Jahre vor | 0

Beantwortet
how many total variable we can define in Matlab 2015?
Run "namelengthmax" to find it out.

etwa 10 Jahre vor | 1

Beantwortet
How to give randi values in different columns of matrix
just add this? b(:,2)=~b(:,1)

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
Custom Library creation issue
The document is for MATLAB R2016a. I tried in MATLAB R2015b. It seems working, no errors. When I tried in MATLAB R2012a. T...

etwa 10 Jahre vor | 0

Beantwortet
How can i add grid lines on interactive editing on a matlab figure
Double click the Axes, it will bring up the Property Editor for Axes. There are check-marks for Grid on X, Y and Z.

etwa 10 Jahre vor | 2

| akzeptiert

Mehr laden