Beantwortet
How to run matlab code in java / android
The toolbox "Matlab Coder" do might what you are looking for. This allows you to export code for a specific language. Be advised...

mehr als 7 Jahre vor | 0

Beantwortet
find element in cell
An alternative to KSSVs solution would be this one liner b = a(cellfun(@(x) sum(x==3)>0, a));

mehr als 7 Jahre vor | 1

Beantwortet
How to plot multiple Xaxis Label| Unit in Hour and Time of the day? Both XLabel at the bottom
You could do something like this: ax1 = gca; ax2 = axes('Position',ax1.Position,... 'XAxisLocation','top',... ...

mehr als 7 Jahre vor | 0

Beantwortet
Replacing each array element with a series of values
One possible solution would be: 0. having T = [1 4 7]; 1. create a temporary matrix T_temp that looks like (th...

mehr als 7 Jahre vor | 0

Beantwortet
access the row and col of a matrix
2 Possibilities Easiest: row column A(2,3) Second possibility (by element count) A(8)

mehr als 7 Jahre vor | 0

Beantwortet
Calculate derivative with 3 matrices
What would you do if you only had 1 Dimension? You would do (y2-y1)/(x2-x1) with x2 being the nearest x to x1. Do exactly the...

mehr als 7 Jahre vor | 0

Beantwortet
Plot different curves in cycle for
You where almost correct. Just 2 small corrections: 1) "hold on" You added this line at the end of the script - this wont hel...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
Applying function only to certain files in directory
The simplest solution is, when you know a priori what your files are called. In that case use wildcards with * listing = dir...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
(MATLAB TRICK AND SHORTCUTS): I would like to rename all my variables within a script without do it manually one by one
There is a simple solution for this, although it is ugly. But it takes minimal time to adapt. *Old Function* function [o...

mehr als 7 Jahre vor | 0

Beantwortet
Minimization problem (FMINCON): I am unable to minimize my function: "Not enough input errors" and others
I think the solution might be in the way you created your function fun. if you check the documentation for fmincon it states ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
My 'From Workspace block' does the wrong value after 10 seconds
That is because your variables t only covers the range from 0.0 - 9.8s (checkout t(end)) So after 9.8s your "From Workspace" ...

mehr als 7 Jahre vor | 0

Beantwortet
How can i get required number of sample from simulink to workspace?
There are multiple possible solutions to your question (with different results), but all of them will fail the "without any dist...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to a GUI directly in Simulink Model?
Not sure what you want to do exactly (or why you want to do that). What version are you using? * If you use one of the new...

mehr als 7 Jahre vor | 0

Beantwortet
How to edit specific lines of a large text file?
If you already know the line number that you need to edit, I suggest to use one of the following solutions on matlabcentral <ht...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Why does my data have more than 2 dimensions?
There is multiple options to force your 3d data into a vector Option 1: use dot notation % gets you a column vector a...

mehr als 7 Jahre vor | 1

Beantwortet
Explanation for LSB data hiding
you might get an answer if you leave the decimal notation and go to binary. Here is a mini example dec2bin(248) = 11111000 ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How do you group categorical variables in order to create a boxplot?
I'm not entirely sure what you want to do, but this little example, that I created might help you to get started % create s...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Cannot make several plots in one graph with the command "hold on"
funny, all the 3 lines stay exactly on each other, that way you dont see the other two lines. So everything is working as it sho...

fast 8 Jahre vor | 0

Beantwortet
linear combination of curves to match a single curve
This can be done nicely in a least squares approach - especially with Matlab mldivide operator. I will give you an example ...

fast 8 Jahre vor | 0

Beantwortet
Calling user functions recursively
First of all: Listen to John - he is right about this. Try not to use numbered functions and variables (you can read why this is...

fast 8 Jahre vor | 0

Beantwortet
How to use "Variable Names" from "Import Data" UI in the legend of a plot?
Something like this? a = uiimport('test.csv'); plot(rand(10, 6)); legend(a.colheaders);

fast 8 Jahre vor | 0

Beantwortet
How to use Matlab for latex output?
Here is an answer to a similar question on Matlab Central <https://de.mathworks.com/matlabcentral/answers/161458-how-can-i-ch...

fast 8 Jahre vor | 0

Beantwortet
Is there a way to open *.mat file as a text file
In your *.mat file, there is only data available. So no luck there, BUT you can access your command history (if you have acce...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Getting the error:Subscript indices must either be real positive integers or logicals.
The problem is, that you try to access the 4.275th (or smth) element of thetav. You can only access Elements 1 to infinity (inde...

fast 8 Jahre vor | 0

Beantwortet
How to generate random data which follows a specific pattern ?
As KSSV said, the random function generates data very nicely. But this distribution might need to be adapted to your needs. T...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Alert sound/mail for warning me if the program runs overtime.
Another option is to use the timer function. But it is kind of tricky and not as nice. clear all; close all; clc % Ini...

fast 8 Jahre vor | 0

Beantwortet
How to Split excel file using matlab
Hi, you should be able to build something like that, using the following commands. 1. reading your data your_data= ...

fast 8 Jahre vor | 0

Beantwortet
is it possible to write a matlab code that commands outlook to constantly export information?
Hi, I might be able to provide half of the solution. I can show you how to get the active X working with Matlab and Outloo...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Convert base 2 to base 10 using loop
There are two errors in your code 1) Bracket at wrong position (causes your problem to stay at 128 all the time) mult(1,...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How can i compare these two protein sequences?
I made a MWE and got a solution. When you see what was wrong you will say "oh man".... I used the following as an input. ...

fast 8 Jahre vor | 0

| akzeptiert

Mehr laden