Answered
Workaround for external program crashing
Can you try to use system()? It returns status that you might be able to use.

9 years ago | 0

| accepted

Answered
How to save output in different column for each loop
You could save the result in a temporary variable and do fprintf() at once. For example A=zeros(4,1); for k=1:4 A(k,1...

9 years ago | 0

Answered
Dynamic structure overwrites existing fields instead of adding new field
I think your function needs to be written in this way function [Data]=BuildStruct(OriginStruct,variable,data) Data=Orig...

9 years ago | 1

Answered
My matlab gets an error when trying to plot anything
It looks like there is a mix up of files. The error message indicates it is looking for the 32-bit version of the MATLAB file. B...

9 years ago | 1

Answered
How do I get user information?
You mean this? getenv('UserName') getenv('UserProfile') getenv('UserDomain')

9 years ago | 1

Answered
Writetable does not allow me to have more than 32 columns in my table!
You may have a quite old version of Microsoft Office, in which the Excel has a limit of 256 columns. Try some data with less num...

9 years ago | 0

Answered
How can I specify the number of significant digits in an output variable
format LongG str2num(temp)

9 years ago | 0

Answered
can i simply generate blocks to simulink from m-file code
Here is the link to the online R2017a document. You can find similar section in your version of MATLAB/Simulink. https://www....

9 years ago | 0

| accepted

Answered
read decimal numbers of excelfile - but shows in e
"format LongG" should do the trick

9 years ago | 0

Answered
How to solve Conversion to cell from double is not possible.
Your variable actOld must be cell. Check it using class(actOld); >> actOld=cell(5,1); >> actOld(1)=randi(3) Conversio...

9 years ago | 0

Answered
Very basic error with switch
The returned variable raw is a cell array, you can find this out by running class(raw(1,9)) What you should use is: ...

9 years ago | 1

Answered
Testing if a Python executable was detected, gracefully
Did you check "doc pyversion"? The syntax is there: [version, executable, isloaded] = pyversion

9 years ago | 0

Answered
How to draw bunch of line segments?
x=1:10; y=rand(size(x)); line(x,y);

9 years ago | 0

Answered
How to display measurements in Matlab model?
Simulink->Sinks->Display

9 years ago | 0

Answered
How can i print the value of a variable in the text that is to be displayed while asking for an input?
i=3; string=sprintf('Enter the value of %d th variable',i); x=input(string);

9 years ago | 0

Answered
randomly distribute a matrix to a bigger one
Value=randn(16,2); Array=zeros(16,4); %% random distribute 32 values to the whole 16x4 matrix index=randperm(64,32)...

9 years ago | 0

Answered
How to access Matlab Online
To access MATLAB Online, you must be current with one of the following license types: MATLAB and Simulink Student Suite ...

9 years ago | 0

Answered
How to save the output of an executable file in a different directory than current running directory?
Run your MATLAB script or function in your desired directory, use system() command by specifying the location of your executable...

9 years ago | 0

Answered
How to part a Matrix into submatrices based on the data
A=magic(5) a=A(A(:,3)==1,:) b=A(A(:,3)==13,:) c=A(A(:,3)>=10,:)

9 years ago | 0

Answered
How to name an excel worksheet when using writetable
writetable(TableObj,'test.xlsx','FileType','spreadsheet','Sheet','MyTable')

9 years ago | 1

| accepted

Answered
How to convert a matrix of cells to a regular matrix
cell(cellfun('isempty',cell))={0} cell2mat(cell)

9 years ago | 1

Answered
xlswrite command not working
should it be xlswrite('file. *xlsx*', [1 2 3])? Sometimes when you initially had some types of file error, the file kept bein...

9 years ago | 0

Answered
Warning: Function and has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
The message says that your code contains a function that has the same name as a built-in function. For example, you might have w...

9 years ago | 0

| accepted

Answered
how to check rtw is installed or not in matlab 2012b
rtw (Real-Time Workshop) has been renamed as Simulink Coder since R2011a. To check if you have Simulink Coder installed, run ...

9 years ago | 0

Answered
Simulink model update failing
unPile is likely a customized library block. It is locked when first opened. You can unlock it by open the library model, go to ...

9 years ago | 0

| accepted

Answered
Conditional equation X1=X(y==1) ?
X1=X(y==1,:)

9 years ago | 0

| accepted

Answered
Convert Block : real world value vs stored integer
You mean the "Data Type Conversion" block? Click "help" at the block dialog to see the document of this block. It only applies w...

9 years ago | 0

| accepted

Answered
Return figure handle from a function
Try this? %% Plotting function function li = liner(a,b) li = figure; plot(a,b); end

9 years ago | 1

Answered
Remove headers from multiple .dat files (EEM Matrices)
Please see this example: A=magic(5) A(1:3,:)=[] A(:,1)=[]

9 years ago | 0

Answered
How can I fix my code so that it evaluates matrices of all sizes?
please note, length(B) is equal to max(size(B))

9 years ago | 0

Load more