Insert variable in a string, matlab -


I am analyzing some data and I need to load the information from the file. I have written a script in which the following The row is:

  Load ('../ Psychopy / DataPrueba / Estefi_1_datos.mat');   

I'm thinking that something like this is written:

  name = Estafie; Load ('../ Psychopy / DataPrueba / Name_1_datos.mat');   

Because it is data from an experiment, what I have to do with at least 40 people and that little change in script will make my work much more organized.

You can do it like this:

  name = 'Estepie '; Load (['../ Psychopy / DataPrueba /', name, '_ 1_datos.mat']);   

Two things to note:

  1. variable name should be a string ( ')
  2. You must use square brackets ( [] ) around the combination of strings and your variables.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -