Beantwortet
Change "current block"/gcb/gcbh programmatically
The best way to resolve this is to use the actual block path or block handle, instead of gcb/gcbh. You could modify the function...

etwa 10 Jahre vor | 1

Beantwortet
Calling a Simulink-Modell by Button Click
What do you mean "call a Simulink-Model", open it and run simulation? You can put some code similar to below in the callback fun...

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
create zeroes of of row and colum of a huge matrix
zeros(n) creates a nxn all zero matrix zeros(m,n) creates a mxn all zero matrix

etwa 10 Jahre vor | 0

Beantwortet
How do I add column headers to a spreadsheet in MATLAB after converting .mat file to .xlsx file?
Use table object would be better for this. help table

etwa 10 Jahre vor | 0

Beantwortet
Removing Hidden Files on Windows
"path" is a MATLAB command/keyword. Try not to use it as variable name. dir('*.xlsx') won't return "." and ".." so you don't ...

etwa 10 Jahre vor | 0

Beantwortet
copy m file from matlab path to current working directory.
a=which('myfunc.m'); copyfile(a,'myfunc.m');

etwa 10 Jahre vor | 1

| akzeptiert

Beantwortet
Multidimensional array indexing question
x=rand(6,2,4); MeanX=mean(x,2); idx=x(:,1,:) < x(:,2,:); x(idx)=MeanX(idx);

etwa 10 Jahre vor | 1

Beantwortet
what exactly this Logical indexing refering to?
Please look at the "Using Logicals in Array Indexing" part of this "Matrix Indexing" web(fullfile(docroot, 'matlab/math/matri...

etwa 10 Jahre vor | 0

Beantwortet
How to remove sets of values from a column vector using two column vectors with the starting and stopping indeces for removal by row
This method uses string. Not sure if it is more efficient. num=[x_start,x_stop]'; str=sprintf('%d:%d,',num(:)); x(str...

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
How do I write to a variable multiple times in the same time step in simulink?
This is a good case for using the Merge block. Connect all three outputs to a Merge block and then connect to a single "Data Sto...

etwa 10 Jahre vor | 1

| akzeptiert

Beantwortet
Using a Library linked Subsystem twice in a model with different Parameter-Settings
You need to make that library-Subsystem a masked subsystem. Bring that parameter for the Constant block to the mask interface as...

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
When working with 2 library models, is there a way to script the location of a library block to move it from one library to the other in a model?
Look at the "ReferenceBlock" property of the block. It is the full path to the block in the library model file, following "Libra...

etwa 10 Jahre vor | 0

| akzeptiert

Beantwortet
When dealing with the data type "ufix16_Sp1" what does the Sp1 mean?
web(fullfile(docroot, 'fixedpoint/ug/fixed-point-numbers.html'))

etwa 10 Jahre vor | 1

| akzeptiert

Beantwortet
How to create counter in simulink instead of using block in library
One way to find out is to drag that Counter library block to your model and then right click, select "Mask", "Look Under Mask"

etwa 10 Jahre vor | 0

Beantwortet
Finding NaNs in cell array.
Data_text={'Speed' 'Load' [NaN] 'Sample'}; index=cellfun(@isnan,Data_text,'uni',false); index=cellfun(@any,inde...

mehr als 10 Jahre vor | 1

Beantwortet
How to copy or transfer a portion of matrix to another at same location?
index=A~=0; C=B; C(index)=A(index);

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
How to modelling the powertrain of HEV with SimScape
Modeling HEVs Using Simscape http://www.mathworks.com/videos/modeling-hevs-using-simscape-89115.html

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
How do I display the code line number?
I suggest using the warning('msg'). It will tell you the code line number in the Command Window when it happens.

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
if i have matrix i want to convert it to vector?
transpose(reshape(b,3,[]))

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to copy an array with some left-over indicies also added on?
n=3; b=cat(1,repmat(a,n,1),a(1:n))

mehr als 10 Jahre vor | 0

Beantwortet
Combining matrices, adding two matrices in into a bigger one.
Kg(3:6,3:6)=Kg(3:6,3:6)+Ke2

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
How to only allow certain character/numeric response after prompt; cancel all script if conditions not met?
Use questdlg() for the user to select input. Make your script a function and use return() to exist the function. functio...

mehr als 10 Jahre vor | 0

Beantwortet
How to add rows to a mtrix following a certain condition?
r= [0; 1; 1.5; 1.6; 2; 10.4; 15.5]; rf=unique(floor(r)); r_out=bsxfun(@plus,rf.',(0:0.1:1).'); r_out=r_out(:); ...

mehr als 10 Jahre vor | 0

Beantwortet
Getting warning: Could not start Excel server for export. XLSWRITE will attempt to write file in CSV format.
Sometimes it may be overlooked, but can you check if you can open an Excel file in Excel by double clicking that file? I had thi...

mehr als 10 Jahre vor | 0

Beantwortet
Matlab Simulink Bit Extraction
Remove the "Integer to Bit Converter" block.

mehr als 10 Jahre vor | 0

Beantwortet
Matrix syntax error question
index=A>B; A(index)=B(index);

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
Concatenate a 10x4x40 Double Matrix to 40x4
reshape(A(1,:,:),40,[])

mehr als 10 Jahre vor | 0

Beantwortet
Extracting fields from structures with varying names.
Use this example to see if it helps to resolve your issue clear; data_23_200_600_451=struct('strings',{{'hello','yes'}},...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
converting categorical array to cell array
a=nominal({'R_','G_','B_'}); b=cellstr(a); c=strrep(b,'_','-'); d=nominal(c) d = R- G- B-

mehr als 10 Jahre vor | 5

| akzeptiert

Beantwortet
Running .exe with system()
Try this: 1. Put this line into a text file called input.txt -p -d2 --noLP -P dna_mathews.par --noconv < sequence1.fa > ...

mehr als 10 Jahre vor | 0

Mehr laden