Réponse apportée
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.

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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'...

environ 6 ans il y a | 1

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

Réponse apportée
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...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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_(:)];

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 7

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 6 ans il y a | 0

Réponse apportée
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

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 3

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 1

Réponse apportée
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...

environ 6 ans il y a | 0

Réponse apportée
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...

environ 6 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 6 ans il y a | 0

| A accepté

Charger plus