Community Profile

photo

Florian Bidaud


Last seen: 19 days ago Active since 2022

Statistics

  • 3 Month Streak
  • Knowledgeable Level 3
  • Thankful Level 2
  • First Answer

View badges

Content Feed

View by

Answered
need help making a loop URGENT
while x>= 2.9 % run your script end

2 months ago | 0

Answered
X, Y label disappeared in app designer after exporting?
Hi, I guess you should check which callback function is associated with your button, maybe this button plots the figure again w...

2 months ago | 0

Answered
Convert for loop Matlab in python
The equivalent of for i = start:step:finish % do something end is for i in range(start, finish+1,step): #do some...

2 months ago | 0

Answered
How to convert a string into a variable name and assign it a cell of data?
You can use the function eval, although it is not recommanded. For example doing something like: eval([strVarName '=' strVarVa...

2 months ago | 0

| accepted

Answered
How to convert the simulink model to s-function
As said on the error, you must install the compilers on the given link. Then you will be able to generate your S function.

2 months ago | 0

| accepted

Answered
Copy an image (to be selected with a parameter) from one folder to another
filePattern = fullfile(origin_folder, ['name of figure' num2str(k) '.jpg']);

2 months ago | 0

| accepted

Answered
How to generate distincted distanced coordinates?
x = [0:50:1000]; y = [0:50:1000]; [xGrid,yGrid] = meshgrid(x,y);

2 months ago | 2

| accepted

Answered
How to find the maximum element by length without a loop?
arrayStr = [a,b]; [~,i] = max(strlength(arrayStr)); maxStr = arrayStr(i); Careful, that works only if a and b are strings, it...

2 months ago | 1

| accepted

Answered
Plotting time in hours
You have one line per hour so you can use directly the line index as your time series and plot the associated variable according...

2 months ago | 0

Answered
How to find number of input and output ports of an unknown simulink model ?
Hi, You need to use the function get_param with 'Ports' as a parameter, for each subsystem of your model. The first and second...

2 months ago | 0

Answered
How to load data into a function
Hi, If data is a variable, you must include it as a input of your function function [z] = hello(x,y,data) load(data) %Rest o...

2 months ago | 0

Answered
How can I make my function plot lines to make a rectangle?
Hi, Your function just plots one point. You need to plot all the points of your rectangle, and closing it by returning at the f...

2 months ago | 1

| accepted

Answered
move txt file from one folder to another
Hi, There is an error in your code, you've added quotes around your variable name. This should work. A = 300; writematrix(A, ...

2 months ago | 0

| accepted

Answered
How can I load different simulink model blocks into new simulink model using Matlab scripts ?
Hi, Check add_block: add_block

2 months ago | 0

| accepted

Answered
How to create personalized colormap that starts from a specified value
Hi If Z is the map you plot, you can replace all the negative values by 0 like that : Z = [0 1 8; -1 5 10;-6 -3 14] Z_nega...

2 months ago | 0

| accepted

Answered
Why a field is replaced by next field when corresponding function is being called within a loop?
Hi, You're using the same [SL_CI,DL_CI] to store both fields, so the last one override the first one. You should have storing...

3 months ago | 0

Answered
Getting just the time in Date-time cell
Hi for i = 1:length(txt(:,1)) if ~isempty() txtSplit = strsplit(txt{i,1},' '); txt{i,2} = txtSplit{2}; end The value ...

3 months ago | 0

| accepted

Answered
Repeatedly call a function in App Designer while working with the App
Hi Have a look a these: https://uk.mathworks.com/help/matlab/matlab_prog/use-the-background-to-make-your-apps-more-responsive....

3 months ago | 0

Answered
find Maximum values in intervals of time(each 2000 values)
Hi, I would do something like that for i = 1:(length(u)-1)/2000 maxArray(i) = max(u((i-1)*2000+1:i*2000)); end You'll ...

3 months ago | 0

Answered
Predict power consumption using linear regression
Hi, You can use the function polyfit with x being the time and y being the power consumption, you will have to choose n to fit ...

3 months ago | 0

Answered
How to multiply two cell array
Hi, C = {}; A={1,2,3}; B={'a','b','c'}; for i = 1:length(A) for j = 1:length(B) C{end+1} = {A{i},B{j}}; e...

4 months ago | 0

| accepted

Answered
how to debug the non-working of real() function?
Hi, I guess sinr_los1 is your matrix ? Could you share the inputs and the outputs ? Because both solutions should work M = ...

4 months ago | 0

Question


fopen always open the file even when it is already open
Hi, fopen is supposed to return -1 when it can't open the file. So I thought when I had the file open already it would return -...

4 months ago | 1 answer | 0

1

answer

Answered
Why two variables loading the same .mat file are not equal ?
I finally used isequaln to get the result I wanted, thank you all.

12 months ago | 0

Question


Why two variables loading the same .mat file are not equal ?
Hi, I found something weird today and couldn't find an explanation on the forum. When I load the same matlab file twice, and t...

12 months ago | 3 answers | 0

3

answers