Beantwortet
How to display specific image in different window(figure 2)?
If you want to show two images side by side you can use subplot. If your Matlab is new enough you can even use tiledlayout.

etwa 6 Jahre vor | 0

Beantwortet
Creating one curve from different curves
There are at least 3 methods I could think of, each with their own pros and cons: figure(1),clf(1) %% with the symbolic tool...

etwa 6 Jahre vor | 0

Beantwortet
tan^2*(45+x/2)
You probably mean either of these: % if x is in radians: tan(45+x/2).^2 % if x is in degrees: tand(45+x/2).^2 If you don'...

etwa 6 Jahre vor | 1

Beantwortet
How do I take repeat the calculation of average column?
splitapply will do the trick. You can fairly easily find the number between 'data' and '--', so creating the group IDs shouldn't...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Create a mobile app with MATLAB
You may have some luck with converting to JavaScript. You could also try this doc page and the pages it links to for informatio...

etwa 6 Jahre vor | 1

Beantwortet
Can I write a builtin Clock in my standalone application exe file?
Host the UTC timestamp on your server and then use a function to retrieve it. That way you have a known correct date to verify y...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to clear this plot?
You should probably make your code into a function instead of copy-pasting it. That would highlight that you didn't define angle...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
What is the Order of Function Precedence in MATLAB 2019b or 2020a?
Here is the official list: <https://www.mathworks.com/help/matlab/matlab_prog/function-precedence-order.html> I don't know wh...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
How to extract data from diary?
This would probably be far easier if you captured the output at the source, instead of parsing the diary. This code works, but ...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Find indices for the minimum positive values in a cell
You can always consider cellfun if you want to apply a function to every element of your cell. It might not be the fastest optio...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Script that create all combination in a matrix
Yet another possible solution: A=0:3;B=0:3;C=0:3; [A_,B_,C_]=ndgrid(A,B,C); combs=[A_(:),B_(:),C_(:)];

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How can I use the data from one guide in another guide?
You will either need to make sure the second GUI has the handle to the first GUI, or save the variable to an external place both...

etwa 6 Jahre vor | 0

Beantwortet
initialize a MxN matrix with the same number
Inspired by the comparative speed test in the answer by Friedrich, I extended his code to have more robust testing that could be...

etwa 6 Jahre vor | 7

Beantwortet
How to solve "Line cannot be a child of Figure." error?
You need to create an axes object first so you can use that as the parent object instead. fig_UPS = figure; ax=axes('Parent',f...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Replacing specfic numbers in string
Apart from needing to replace the commas in your array by periods, I don't see where you went wrong. The RE seems fine and the w...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
determining the x value at 20% of the area under curve
Easy with a cumulative sum: aaa=cumsum(y)/sum(y); idx=find(aaa>0.2,1); x(idx) Note that this is not an exact value, but an e...

etwa 6 Jahre vor | 0

Beantwortet
about the inbuild image in matlab
The default image that is built in to the image function is 64*64. Other example images (like cameraman.tif) are 256*256. You c...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to write a script to analyse data files
You can use dir to retrieve all the file names. And since you don't actually use the input of your function, I don't see why you...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to change 2D wave spectrum unit (from m^2s/rad to m^2/(Hz degree)
This isn't really a Matlab question, but let's go for it: m^2 is staying, so nothing needs to be done here Hz is 1/s, so s is ...

etwa 6 Jahre vor | 0

Beantwortet
I'm not sure about fminsearch. How should I make this code correct?
Use this instead: Error_sum=@(x) 0; for i=length(Peak_areas) Error_sum=@(x) Error_sum(x) + ___ end

etwa 6 Jahre vor | 0

Beantwortet
Generation of random number which needs to be passed to an array
You can generate all combinations and mix them up like this: [A,B]=ndgrid(-0.2:0.1:2.2,-3.2:0.1:0.2); new_order=randperm(numel...

etwa 6 Jahre vor | 0

Beantwortet
How can i choose 100 random point in a hexagon?
You can generate random points and use inpoly to select the values that are inside the polygon. If you have trouble implement...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How can i modify my code to do to find the smallest triangle number whose digits add up to N
You are close, but you are skipping some steps. Try to really strictly define the steps of your program. Find the next triangle...

etwa 6 Jahre vor | 0

Beantwortet
Different input variables depending on case within a switch ?
You can do this with nargin, nargout, varargin, and/or varargout. Edit: Note that this example does no input checking and will...

etwa 6 Jahre vor | 0

Beantwortet
How can I plot the exported ASCII file from fluent?
The code below simply ignores the z-values, since there only seems to be a single line in the yz plane that was actually conside...

etwa 6 Jahre vor | 3

| akzeptiert

Beantwortet
question about the number format in conditional statements
The logical data type encode either true or false. That makes it an obvious choice for conditional statements, as you are lookin...

etwa 6 Jahre vor | 0

Beantwortet
how to install matlab in windows 10 32 bit?
You will have to get R2015b or older. You should be able to select older releases in the download center. If your license doesn...

etwa 6 Jahre vor | 1

Beantwortet
Select the correct data from matrix
You're probably using min to select the smallest value, so you should use the second output to find the index of those values. T...

etwa 6 Jahre vor | 0

Beantwortet
How can i solve this exam practise question
Since you aren't allowed to use efficient tools (e.g. sort), you are forced to write slow code. I would not try to use eval to c...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
writing text files with mix of variables and strings
The reason your file is empty is that you forgot to supply the fid to the fprintf function, which causes it to print the text to...

etwa 6 Jahre vor | 0

| akzeptiert

Mehr laden